I'm creating an obby that you have to go fast. I got a solution, but i had my friend try it and it won't work for him. And i can understand why, because this is what i used.
game.Workspace.Roblozinko.Humanoid.WalkSpeed = 75 repeat game.Workspace.Roblozinko.Humanoid.WalkSpeed = 75 wait (.5) until 6 == 5
It's because his and my username is different, so it only works for me. and i tried one from another question,
wait (5) repeat game.Workspace.Player1.Humanoid.WalkSpeed = 75 wait (.5) until 6 == 5
and that didn't work. I got the output, "Player1 is not a valid member of workspace." I also tried it in a localScript and Script. Please help! thanks. :3
Simple and straightforward: Whenever a players' character is added, set their Humanoid's WalkSpeed to 75. This can be accomplished using the CharacterAdded
event of Player instances.
Insert a Script into ServerScriptService:
game.Players.PlayerAdded:Connect(function(plr) plr.CharacterAdded:Connect(function(char) -- This will fire every time their player's chararcter gets added char:WaitForChild("Humanoid").WalkSpeed = 75 end) end)
Hope I helped!
Maybe try this method.
local Players = game:GetService("Players") for _,Player in pairs(Players:GetPlayers()) do local Char = Player.Character or Player.CharacterAdded:Wait() if Char then Char:WaitForChild("Humanoid").WalkSpeed = 75 end end)
x = 50 --speed boost
for i,v in pairs(game.Players:GetPlayers()) do v.Character.Humanoid.Walkspeed = x end