I am developing a roll the dice script, where two of the rolls force a player to move forward or spin around in a random direction. My question is how do I go about doing this properly?
The only way that I can figure out how to do this is to do ply:ConCommand( “+forward” ) (or +left/+right). This doesn’t work very well as a player could just run the anti-command (-forward) and stop the effect.
In addition, I would need to suppress the player’s ability to hit their backwards key this neutralizing the forward movement, however I cannot find an effective way to disable the players
“IN_BACK” key. I have attempted to use a hook, but cannot get the hook to disable itself when the timer ends and thus relieving the player of the forced movement.
So basically what I am asking is whats the most effective way to force a player to move forward or spin for a certain amount of time? And how to disable a specific key during the time?