I’m getting the following error in the following code:-
if (transform.position.y <= b.retHeight()) {
s.inAir =false;}
" Object reference not set to an instance of an object
movement.Update ()"
(the script’s name is movement.cs)
I’m getting the following error in the following code:-
if (transform.position.y <= b.retHeight()) {
s.inAir =false;}
" Object reference not set to an instance of an object
movement.Update ()"
(the script’s name is movement.cs)
Based only on what you’ve shown us, either b or s are not set to anything.
Print them with Debug.Log() to see which it is
And in the future please give us the complete script code and the complete error message. they contain useful things like line numbers.
Errors often aren’t where you think they are.