extends RigidBody var hit_timer = 0 func _process(delta): if hit_timer >0: hit_timer -= delta if hit_timer <= 0: $MeshInstance.get_surface_material(0).albedo_color = Color(1,1,1,1) func hit(): $MeshInstance.get_surface_material(0).albedo_color = Color(1,0,0, 1) hit_timer = 1