I have followed the tutor example but I changed them to be on my own way .However, when I typed that I wanted to repeat the game or restart it , it didn’t work even though I have made sure that I followed every step that the tutor did so what should i do please help me .T_T
im seeing that you have a few issues showing up in the solution explorer, are they previously removed solutions?
any chance you can paste the script in please, just so I can test, looks ok, but I can try it in Monodevelop, just in case I’m missing something when looking at it.
Ive just loaded it up and tested.
Seems to do what it should, I’m getting the StartGame function calling after the spacebar is pressed.
Would it be possible that the script wasnt saved when you tested? have you saved and restarted Unity to test?
One other thing to have a look at, would be to right click and close the broken solutions in Mono (the once that are failing to load in your screenshot) just in case files have moved and that isnt actually saving the file that unity is using.
try it again and see how you get on.
one other thing to do, as a suggestion, would be to reset the guess value once you call the StartGame, otherwise the guess remains at the value you ended the last round with.
Try indenting StartGame after void Start. I noticed it wasn’t indented when looking at your script. Not sure if this helps but hope it does.