no output
It is only supposed to change a single persons learderstats when they start walking up stairs, but one person can be walking up the stairs but the leaderstats value change for all players.
local
local toucher = game.Workspace.Step_Givers:GetChildren()
for i = 1,#toucher do
local debounce = false
toucher[i].Touched:Connect(function(hit)
if not debounce then
debounce = true
script.Parent.RemoteEvent:FireServer(hit.Parent.Name)
print(“ADDED”)
debounce = false
end
end)
end
ServerSide With Remote Event
script.Parent.RemoteEvent.OnServerEvent:Connect(function(Player)
local steps = game.Players:FindFirstChild(Player.Name):FindFirstChild(“leaderstats”):FindFirstChild(“Steps”)
steps.Value = steps.Value + 1
end)