Yes I know this question has been asked many times! But I can’t figure it out, I am making a Pong game and I am trying to get it so the user inputs a score limit they want. (called limit)
Then in another script from another scene I say:
when Player 1 score is >= limit
Change the scene to Player 1 wins
(I have got rid of this now while I am testing)
But for some reason when limit is seen in the other script the value resets to 0
And I have done a test to see what is the problem and it is the fact that the variable “limit” isn’t being accessed by the other script, the other script just makes a new variable called limit.
Any help?
The Image above is where the limit variable is input (from an input field)
This image above is where I am trying to access it from - as you can see with the “Debug.Log(limit)” I am testing to see if if it has the same value that was input and the answer is no