So… This has me stumped.
I have a script that changes the players walkspeed, AND IT WORKS, the first time I change the stuntime value, it changes the players speed to 4, and it works.
The thing is, the second time I do it, it does not change the walkspeed. When I print the players walkspeed the second time, it says that it’s 4, but it’s literally 15 in the humanoid
FIRST TIME
SECOND TIME
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
wait(3)
local Debounce = false
local PlayerFolder = game.ReplicatedStorage.PlayerFolders:FindFirstChild(Player.Name)
while true do
wait(.1)
if PlayerFolder:FindFirstChild("StunTime") then
if PlayerFolder.StunTime.Value > 0 then
Debounce = true
PlayerFolder.StunTime.Value -= .1
if Character.Humanoid.WalkSpeed >= 4 then
print(Character.Humanoid.WalkSpeed)
Character.Humanoid.WalkSpeed = 4
end
end
end
end
end)
end)