How would I make the player run fast/start sprinting when they hold down the shift key?
Insert a RemoveEvent in the workspace and name it ServerChange. Place a script inside and type these lines:
script.Parent.OnServerEvent:Connect(function(Nothing, Item, Property, Val) Item[Property] = Val end)
Insert another LocalScript into StarterGui and type these lines:
game:GetService("UserInputService").InputBegan:Connect(function(input) if input.KeyCode == Enum.KeyCode.LeftShift then workspace.ServerChange:FireServer(game.Players.LocalPlayer.Character.Humanoid, "WalkSpeed", 20) end end)
Hope this helped send a comment if it didn't
Or Just make an easier script like this:
local uis = game:GetService("UserInputService") --Search for UserInput Service uis.InputBegan:Connect(key) if key.KeyCode == Enum.KeyCode.LeftShift then --If LeftShift Pressed, then Player speed = 25 game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 25 end end) uis.InputEnded:Connect(function(key) if key.KeyCode == Enum.KeyCode.LeftShift then --If LeftShift Press Ended, then Player speed = 16 game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 16 end end)