I`ve been trying to figure out how to run a certain script by pressing a key. Also if you could add how to make it so the owner of the game can only run it then thanks.
COMMUNITY QUESTION
Whats the script for `Push a key to run a script`?
1 answer
Use UserInputService for the key part, found here: https://wiki.roblox.com/index.php?title=API:Class/UserInputService/InputBegan
Then use If statements (conditional statements) to detect the players name and or UserId: http://robloxdev.com/articles/Conditional-Statements-in-Lua
Then you'd want to change the WalkSpeed of the Humanoid, properties of the humanoid: http://wiki.roblox.com/index.php?title=API:Class/Humanoid
This discussion is preserved as it was. New answers, comments, and votes are closed.
