There is no collision in raycast at the moment of calling get_collider().dosomething
You have to make sure collider exists at this moment. Take a check
if get_collider() != null :
I can see You are expecting collision at the moment of ready(). Ready is called only once, so it You won’t detect any collision later with it. This function should be placed elsewhere. What do You want to do with this raycast and collider ?
it is called when pressing jump (spacebar)
and i tried that if you suggested but it gives the same error.
51m0n55 | 2022-08-24 12:09
Ah, sorry, it is whole raycast that is missing, not just collider.
The error indicates the number of line of code that provoked the error. It is also highlighted right after project crashes. Debug console shows remote version of editor, and You can check which instance caused this error, what functions led to this.
Possible reasons of this error would be :
-raycast is deleted or replaced somewhere before jumping
-there is no raycast named “raydown” as direct child of player
-there is another instance of player script in game, that doesn’t have raycast
Did You change anything in scene tree before it stopped working ?
Inces | 2022-08-24 12:39
i only changed scripts in other nodes but nothing else
51m0n55 | 2022-08-24 14:08
make sure these 3 things above don’t happen in your projects