Jump to content

why doesnt my script work when i copy it UNITY

i have a car game 

i have a coin collector script that works fine in the first scene. so i copy the whole panel to next scene, and i get this error. Everything i EXACTLY the same as the first scene. why doesnt it work?

i have attacthed the script that was in the error

 

i used this tutorial https://www.youtube.com/watch?v=gDHUsbE8nCw&t=0s

thanks

 

 

 

1111.png.cacbd47e856a2204858f7fa8d011957d.png111.thumb.png.e6350b2425bf759f0c63faf8e16815b9.png

Link to post
Share on other sites

"Object set not set to an instance" means you are referring to something that hasn't been made. It has been declared, but an instance does not exist of it.

 

Have you added the text to the script in the inspector?

Such as here:

image.png.6f19f35fe40417220a7f4f3adcd4a40a.png

 

Go to your scene, go to the object you have applied the PointsScorer.cs script to, look for the script in the inspector and then look at "myScore", where you have to apply the point text field.

This is explained at 12:57 of the tutorial:

 

"We're all in this together, might as well be friends" Tom, Toonami.

 

mini eLiXiVy: my open source 65% mechanical PCB, a build log, PCB anatomy and discussing open source licenses: https://linustechtips.com/topic/1366493-elixivy-a-65-mechanical-keyboard-build-log-pcb-anatomy-and-how-i-open-sourced-this-project/

 

mini_cardboard: a 4% keyboard build log and how keyboards workhttps://linustechtips.com/topic/1328547-mini_cardboard-a-4-keyboard-build-log-and-how-keyboards-work/

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×