Hello,
I am struggling trying to make a dummy mimic a players movements. The code is already mostly written and i can debug that. The main issue is a variable that is not correctly storing the updated speeds of the player.
–Issue
The variable tracks the players speed but only if it surpasses the previous player speed.
For example if the player started at a initial speed of 16. The player presses a button and the walk speed is changed to 32. The variable accurately tracks that speed. But when the player slows back down to 16. The variable while actively tracking player speed still somehow keeps getting 32. It will only change if the player moves faster.
--Visual of problem
The third screen show the a walk speed of 16 yet, the variable is still printing 32.
–relevant code
–ideas
I think the problem may be because it is a local script I am using for the process? I am very new the game development so I don’t even know where to even start for debugging. It works, kind of? I Bolded the sentence that may help solve the problem that I think.