generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Need help with a sprint script

Previous Thread :: Next Thread 
tacomermaid123 is not online. tacomermaid123
Joined: 20 Sep 2012
Total Posts: 26
10 Jun 2017 04:17 PM
I'm fairly new to ROBLOX Lua. I'm attempting to make a script that increases the users walk speed. I put a local script in the starter pack and typed this
-------------------------------------------------
repeat wait() until game.Players.LocalPlayer
local mouse = game.Players.LocalPlayer:GetMouse()
local player = game.Players.LocalPlayer

mouse.KeyDown:connect(function(keydown)
if KeyDown == "0" then
player.Character.Humanoid.WalkSpeed = 50
end
end)

mouse.KeyUp:connect(function(KeyUp)
if KeyUp == "0" then
player.Character.Humanoid.WalkSpeed = 16
end
end)
------------------------------------------------------------
Anyone know what's wrong? Thanks.


But what if you both cry? ¯\_(ツ)_/¯
Report Abuse
Mindmixer is not online. Mindmixer
Joined: 05 Jul 2011
Total Posts: 1878
10 Jun 2017 04:22 PM
Any errors in the output?
Report Abuse
tacomermaid123 is not online. tacomermaid123
Joined: 20 Sep 2012
Total Posts: 26
10 Jun 2017 04:27 PM
I'm not seeing any.


But what if you both cry? ¯\_(ツ)_/¯
Report Abuse
LaeMVP is online. LaeMVP
Joined: 24 Jun 2013
Total Posts: 4416
10 Jun 2017 04:45 PM
Don't user KeyboardInput use UserInputService or ContextActionService
Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
10 Jun 2017 04:46 PM
also u dont have to do the repeat wait thing
the local player has to exist before local scripts can run
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image