I need to make a function stop running when something collides with the player, but OnCollisionEnter is a function, and you can’t put a function inside a function.
I tried declaring it then calling it later, but it didn’t work…
Can you help?
You could have a boolean variable which changes to false when the collision occurs (By putting it in OnCollisionEnter)
Then have a while (boolean = true) in your other function.
Hope this is what you are trying do do.
alert(“THANK YOU”)
print(“It’s Okay!”);