r/UnityHelp • u/ScroobledEggs • Jan 30 '22
PROGRAMMING Movement Script Troubles
I have a simple crouch and sprint script written here along with my movement script, but if I press shift/ctrl it will do what it’s supposed to but then it will stay stuck that way. Like when I press left shift it speeds up but if I let go it stays sped up. Same applies to the left ctrl. Please help.
Thanks in advance!
2
Upvotes
2
u/Fancy_Edge2509 Jan 30 '22
You need to get the script to check if shift and control have been released so it can return the character to the original position.
1
3
u/ryemck93 Feb 01 '22
Need to have the keydown and keyup in there