Getting a score the moment the game starts but not when bumping into obstacle

Hi CaptainCortisol,

As you and bixarrio wrote, the problem is very likely the execution order of method of the same name, which is random in Unity. All OnCollisionEnter methods get executed in a random order.

To solve this problem, rename the OnCollisionEnter which is supposed to get called last to OnCollisionExit. OnCollisionEnter gets executed after all OnCollisionEnter were executed.

Did this fix it?


See also: