Godot Version
4.2.1 stable
Question
I can’t get the “$Graphics/Dead.show()” mode to work in the script. I don’t know what went wrong. could you help me?
4.2.1 stable
I can’t get the “$Graphics/Dead.show()” mode to work in the script. I don’t know what went wrong. could you help me?
You are trying to call show() on a nonexistent path. A proper path to your death graphics would be “$CollisionShape2D/Graphics/Dead”. You have the same problem with hiding your alive graphics.
A quick tip to avoid this in the future:
You can drag your desired node from the tree directly into the script and it will automatically create a path to it.