extends Area2D @export var Menu : PackedScene @onready var BaseCollider = $"../BaseCollider/BaseColliderDetector" var MenuInst func onbcbodyentered(body): if body is MainShip: body.MSEngine.Speed = 0 func _on_body_entered(body): if body is MainShip: body.AllowShooting = false MenuInst = Menu.instantiate() #get_tree().current_scene.add_child(MenuInst) body.find_child("GUI").add_child(MenuInst) #MenuInst.global_position = body.global_position# - Vector2(640, 360) MenuInst.modulate = get_parent().modulate func _on_body_exited(body): if body is MainShip: body.AllowShooting = true MenuInst.queue_free()