How would I go about taking a Node off of its parent Node, and attaching it to another one inside GDscript?
I am trying to achieve this with the code below, but I truly have no idea what I’m doing. I want an enemy node to become the child of the player node. (Ignore the awagga)
func _on_camera_body_entered(body: Node3D) -> void:
if body.is_in_group("GHOST"):
var PARENT = body.get_parent()
PARENT.remove_child(body)
add_child(body)
print("AWAGGA")