How can I change the animation frame for an instance? (Invalid set index 'frame' (on base: 'null instance') with value of type 'int'.)

I think you may have an extra node there then. Check the Remote tab while the game is running. It will show you the live structure.

what does the remote tab do?
remote1

I just told you, it shows your node tree as it is when running the game instead of separated into scenes.
Oper the hierarchy until you find the coffee.

remote2

See how the “cup” has a “Node2D” and then the “coffeeliquid” node? That’s why it can’t find it with $ notation. It’s not a direct child of “cup”.

oh ok, so I need to make it a direct child by removing that Node2D, right?

Yeah, and I don’t think you need the script also on that scene, since you’re attaching it to the instance named “cup”.

its still there

Might be you’re looking for a $coffeejug node, but your node is called coffeeliquid?

1 Like