shift to sprint tutorial Roblox Studio

Опубликовано: 25 Февраль 2026
на канале: adpScripting
29
5

Code:

local playerservice = game:GetService("Players")
local player = game.Players.LocalPlayer
local uis = game:GetService("UserInputService")

local sprintSpeed = 30

uis.InputBegan:Connect(function(key)
if key.KeyCode == Enum.KeyCode.LeftShift then
player.Character.Humanoid.WalkSpeed = sprintSpeed
end
end)

uis.InputEnded:Connect(function(key)
if key.KeyCode == Enum.KeyCode.LeftShift then
player.Character.Humanoid.WalkSpeed = 16
end
end)