Hello I require help will a little problem I have discovered. Need to make a chest that spawns a key in my game. The key it’s self on it’s own works as intended. However when the key is instanced by the chest and placed as a child of the chest. The key no longer works and the frame rate slowly starts dropping . I have determined that it is in fact only when the key is instance from the chest this happens . So I need to know how to change the parent of the key scene .
The code for the instance is as follows.
Var SPAWN = preload( key scene)
Func open() Var spawn = SPAWN.instance() Get_parent().add_child(spawn) Spawn.position = $Position2D.global_position
Any and all help would be Appreciated