I am running a script:
func _ready():
screensize.get_viewport().get_rect().size
set_process(true)
spawn_fruit(5)
I am getting an error: Nonexistent function get_viewport in base Nil I've seen this error on other peoples scripts for get_rect and other functions, but nothing for this. I am new to GoDot so go easy on me please:)