When I do this the player speed doesn’t increase when the variable (int) is met. How can I fix this?
- You’re not setting player number
- You’re multiplying speed by 0
You take player number, set it to the very same value again, and then check it if it’s equal to 1. Strange but OK.
You then multiply max walk speed by 0 and clamp it to 100. Providing player number is 1 and the cast does not fail, the result of the above will always be 100.
When I do this the player speed
doesn’t increase when the variable
(int) is met.
What is the player speed before this script is run? Perhaps show us more. The included snippet tells little.
I know its set to zero, I had it that way to make sure that the player speed changed when the player number changed. What do you mean by “You’re not setting player number?”
Never, thank you Evernone for reminding me of the clamp that should have been removed.