Error in the output:
ERROR: This function can't be used during the in/out signal.
at: (scene/3d/area.cpp:196)
ERROR: FATAL: Index p_index = 0 is out of bounds (((Vector<T> *)(this))->_cowdata.size() = 0).
at: operator[] (./core/vector.h:49)
[process exited with code 3221225501 (0xc000001d)]
I am trying to create a moving platform for my game. I get an error when entering the area of the platform (The way I am trying to manage not sliding off is by reparenting the player. Here is the code for that (which I believe is causing it)
func _on_PlayerArea_area_entered(area):
if area.is_in_group("Platform"):
get_parent().remove_child(self)
area.get_parent().add_child(self)
func _on_PlayerArea_area_exited(area):
if area.is_in_group("Platform"):
get_parent().remove_child(self)
get_node("./Characters").add_child(self)
(This is in the player script