Godot Version
godot 4
Question
I’m trying to make a light that moves with the collision position of a raycast, but when I try to set a position, I get the error:
Invalid set index ‘global_position’ (on base: ‘Nil’) with value of type ‘Vector3’.
anyone know why? here’s the assignment for the light as well as the position
I’ve checked, the light is assigned in my scene
@export var lightPoint : OmniLight3D
lightPoint.global_position = Ray.get_collision_point()