I am trying to figure out how Gd scripting works. Am trying to instance a Scene called Ball via script.
I have a main scene where I want to instance another scene called Ball.
And Ball scene:
In Main scene I have the script:
var Ball_asset = get_tree().get_root().get_node("/root/Graphics/Ball")
When I run it. The ball falls and bounces on the collisionShape, but when I press mouse button it freezes and gives me this error: Invalid call. Nonexistent function 'Mouse_position' in base 'Nil'.
Been looking at the documentation and example projects. But I would appreciate some advice on what I am missing.