Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Does anybody know how to make a simple shift to sprint script?

Asked by
DynamX1 -3
6 years ago

I know there used to be a really simple way. I want it to be easy to modify and when pressing shift you sprint. I used to know how but the code has changed and i dont want to use free models

0
It's still pretty simple, but I just used X to sprint. Conquesias 85 — 6y
0
I can make one for you if you wish, or I can just put you on the right path. Conquesias 85 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

It's still pretty simple to do. All you have to do is this:


local UIS = game:GetService("UserInputService") local plr = game.Players.LocalPlayer UIS.InputBegan:Connect(function(obj, gp) if obj.KeyCode = Enum.KeyCode.LeftShift and not gp then plr.Character.Humanoid.WalkSpeed = 0 --change this to what you wish the speed to be end end)

I can also allow you to change it back to normal when you hit it again. If you wish to have it be held, then this script would not work however.

0
Where do I put this script? ABCyahia 24 — 3y
Ad

Answer this question