Roll a Ball Tutorial script error

Hello everyone,

I have been following the “Roll a ball” tutorial with Unity 5.3.2, and I am using Visual studios 2015 as well as the toolbar for Visual studious 2015 for Unity.

I have been having scripting issues, I followed the tutorial up to 12:54 minutes of the step on creating the script( see Unity 5 - Roll a Ball game - 2 of 8: Moving the Player - Unity Official Tutorials - YouTube)

Here is my script

I am recieving an error on my compiler stating "MissingReferenceException: The object of type ‘Object’ has been destroyed but you are still trying to access it. Your script should either check if it is null or you should not destroy the object. Solution ‘Roll a ball’ ‎(1 project) C:/buildslave/unity/build/Editor/Mono/Inspector/Editor.cs 589 "

Here is my Unity set up

Please let me know if there is anyway I can fix this,

Thanks!

1 Answer

1
  1. We can’t see your code, you should post it as text, not screenshoot.
  2. either some object you assigned in script is null (without value) or as we see in 2nd screenshoot you accidently removed script from your ball. See that there is written “(Script) Missing(Mono Script)”. just drag your script into that field with missing script.