So I understand the theory of the “Object Hit” script. Anything with the script remains untagged at the start of the game. The main character that has the “Score” script checks if the obstacle does not equal the “Hit” tag. If the obstacle does not have the Hit tag then it raises the score by 1 when you bump into it. This then changes the obstacles tag to Hit, preventing it from being used to gain more points.
Here is my issue though. I have done everything in the lecture and have paused and went back multiple times looking at the code shown in the video. I’ve copied it exactly multiple times. I’ve also went into the lectures resources and found the code on github and copied it for both the Score and Object Hit scripts. Also, I’ve checked the video to see that the scripts are on the right assets. The main character gets the Score script and the Obstacle gets Object Hit. For some reason whenever I start the game it gives me a score the moment the main character touches the plane.
The plane has no scripts on it and as far as I can see the scripts shouldn’t have anything that causes it to interact with the plane. Yet, everytime I start the game it gives me plus 1 score for touching it. I’ve tried making the plane start out as Hit, and that works, however when I bump into the obstacle it does not give me a point for the score. It only changes red.
Something seems fundamentally broken about whatever I did. I haven’t had any issues with the course content up until this point and I’ve read through the other answers here and tried most things and nothing has worked.
What am I missing?