|Topic was automatically imported from the old Question2Answer platform.
I have been running into an error, which I don’t understand. It crashes my game and it looks like it happens when I try to set the position of an object that is not there. However, before setting the position, I check if the object is there.
carried_object.position = position + $Body.position + Body/CarryPosition.position
The error occurs when I try to set the position of
carried_object, and the debugger marks the variable as unoccupied. However, shouldn’t the line,
if carried_object: prevent this from happening? I assign
carried_object a value in
I hope you can help me. Thanks