I'm making a script where it checks if my player is below a certain y value. Whenever I try to run it, it says Invalid operands 'Vector2' and 'int' in operator '+'
.This is my code
func _physics_process(delta):
if global_position.y >= 270:
get_tree().reload_current_scene()
It might be because I use a physics process but I open a new function and made it a normal process but it still doesn't work. I've read other people's questions related to this but I tried them and it didn't work. Any help?