Today I will be showing you how to make a SHIFT TO SPRINT script in Roblox.
The script will be at the very bottom of the description, social links above it.
------------------------------------------------------------------------------------------------------
Discord Server: / discord
Twitter: / realcrimxxn
Roblox Group: https://web.roblox.com/groups/1142802...
-----------------------------------------------------------------------------------------------------------------
Script: local UIS = game:GetService('UserInputService')
local Player = game.Players.LocalPlayer
local Character = Player.Character
UIS.InputBegan:connect(function(input)
if input.KeyCode == Enum.KeyCode.LeftShift then
Character.Humanoid.WalkSpeed = 26
local Anim = Instance.new('Animation')
Anim.AnimationId = 'rbxassetid://7447892366' --DON'T USE SINCE THIS IS MY ANIMATION FOR THUNDER GAMES
PlayAnim = Character.Humanoid:LoadAnimation(Anim)
PlayAnim:Play()
end
end)
UIS.InputEnded:connect(function(input)
if input.KeyCode == Enum.KeyCode.LeftShift then
Character.Humanoid.WalkSpeed = 16
PlayAnim:Stop()
end
end)