#Running script

1 messages · Page 1 of 1 (latest)

frail igloo
#

As you can see in this script, I want the player's WalkSpeed to increase whenever he moves until he run.
But the script isn't working can someonehelp me with that ?

#
local UIS = game:GetService("UserInputService")
local plrs = game:GetService("Players")
local plr = plrs.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local humanoid = game.Players.LocalPlayer.Character:WaitForChild("Humanoid")

local startSpeed = 16
local endSpeed = 100
local step = 0.1
local delay = 0.003

humanoid.WalkSpeed = startSpeed

humanoid:GetPropertyChangedSignal("MoveDirection"):Connect(function()
    if humanoid.MoveDirection.Magnitude > 0  then
        for speed = startSpeed, endSpeed, step do
    humanoid.WalkSpeed = speed
    task.wait(delay)
        end
    end
end)
#

(Local Script)

twilit ginkgo
#

Any errors?

maiden ironBOT
#

studio** You are now Level 10! **studio

frail igloo