I found this leader board script that shows players WalkSpeed and I copy-pasted it to my game, but it doesn’t show other players WalkSpeed , it only shows your WalkSpeed.
this is a local script under starter character scripts:
local Char = script.Parent
local Hum = Char:FindFirstChild("Humanoid")
local ls = game.Players.LocalPlayer:WaitForChild("leaderstats")
while wait() do
ls.zoom.Value = Hum.WalkSpeed
end
and this is a script under server script service:
local Players = game.Players
Players.PlayerAdded:Connect(function(Player)
local leaderstats = Instance.new("Folder", Player)
leaderstats.Name = "leaderstats"
local WalkSpeed = Instance.new("IntValue", leaderstats)
WalkSpeed.Name = "zoom"
Player.CharacterAdded:Connect(function(Char)
local Humanoid = Char:FindFirstChild("Humanoid")
WalkSpeed.Value = Humanoid.WalkSpeed
end)
end)
I don’t really understand what’s happening, I’ve never touched leader board stuff before, so anything helps.
I made it fire a remote event so that should work. But now if you reset your character and your WalkSpeed was 20, it will glitch out between 20 and your current WalkSpeed.
local Players = game.Players
Players.PlayerAdded:Connect(function(Player)
local leaderstats = Instance.new("Folder", Player)
leaderstats.Name = "leaderstats"
local WalkSpeed = Instance.new("IntValue", leaderstats)
WalkSpeed.Name = "zoom"
while wait() do
local Humanoid = Player.Character:WaitForChild("Humanoid")
WalkSpeed.Value = Humanoid.WalkSpeed
end
end)
probably not the best idea to use task.wait() due to lag and fast update, RunService is not a good idea either since you dont need it to run during Physics and Rendering