#W+W running script
1 messages · Page 1 of 1 (latest)
But i dont know how to script at all
Then you should watch tutorials how to script, because if someone just gonna write this script for you ur not gonna make a good good game with just a run script
Listen to input began and input ended events. Your looking for the following sequence to happen in a short period of time:
W Down -> W Up -> W Down
This can be simplified to
W Down -> W Down
because you can't press W again without first releasing it
You can easily detect that by
- keeping track of the time (
os.clock()) that the last W Down event was received - Whenever W is pressed, check how long ago the last W press was and if its within a threshold enable sprint