I am making a round based game, and every time it starts, it should make the players fast. It kinda works, it is very buggy and the speed resets sometimes once someone dies, but I have no clue why. This is the script I am doing it in.
while wait(1) do
for i,plr in pairs(game.Players:GetChildren()) do
local hum = plr.CharacterAdded:Wait().Humanoid
if plr.Team == game.Teams.Playing then
if plr:FindFirstChild("SpeedActive").Value == false then
hum.WalkSpeed = 30
end
else if plr.Team == game.Teams.Lobby then
hum.WalkSpeed = 16
end
end
end
end
speed active is for something else, if you think that is the problem then ask what it is, but I dont think it is the problem. Im guessing there is just a much more beneficent way of doing this.