Im really new to Godot and have a fairly simple question that I just cant seem to wrap my head around: How to i call a function of a Script attached to an Instance?
In the Main Script of a test Project of mine there are the following lines of code:
var scene = preload("res://Ball.tscn")
var test = scene.instance()
The Script attached to Ball contains the following:
The error i get if i try to run this code is "Invalid call. Nonexistent function 'test' in base 'RigidBody2D (Ball.gd)'
Obviously there is no function called test in RigidBody2D which seems to be the error here, but then how do i refer to the Script of an Instance?
Thanks in advance for any help provided.