![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Vickyboi |
So far, everything I have done resulted in an error with this version giving me this error:
Attempt to call function ‘position’ in base ‘null instance’ on a null instance.
extends Position2D
var rngx = RandomNumberGenerator.new()
var rngy = RandomNumberGenerator.new()
func _on_Button_button_down() -> void:
var x = int(rngx.randf_range(0,1024))
var y = int(rngy.randf_range(0,600))
$self.position(x,y)
What should I do?