So I'm making an elevator game and for a floor I want everyone to run fast to do a speed run but the main code in it won't change the walk speed, Can anyone help?
Here's my code
local timeLimit = script.Parent:FindFirstChild("TimeLimit")
if workspace:WaitForChild("SpeedRun") then
for i,v in pairs(game.Players:GetChildren()) do
v.Character.Humanoid.WalkSpeed = 24
wait(timeLimit)
v.Character.Humanoid.WalkSpeed = 16
end
end

1 comment
Timelimit is a intvalue that tells the script how long it needs to wait until the floor has to stop for example like a beach the value of time limit is 15 then it waits 15 seconds until the floor will be deleted and the doors of the elevator close but at local timeLimit I just had to add value to it