On my 3rd person shooter, when I press shift, it makes the character sprint. Since I am still quite a novice at working around game scripting, I need help with a certain feature I wish to add.
When the shift button is held, I want the character’s gun to rotate upwards. The problem is, I only know how to script something to keep rotating as long as the button is pressed.
I plan to make this an independent script, so I have no reference. Can anyone point out how I can rotate an object to a certain amount of degrees while a button is pressed, and when the button is released, the object will rotate to it’s original position?
If anyone can help me out, thank you so much!