Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Question: Anyone have an obby leader board script?

Hello, I was wondering if anyone has a script that will display a leader board containing the stage number as well as the other players in the game along with their stage numbers. If you could help me out that would be great. Thanks!

1 answer

game.Players.PlayerAdded:Connect(function(plr)
local stats = Instance.new("Folder")
stats.Parent = plr
stats.Name = "leaderstats"

local stage = Instance.new("IntValue")
stage.Name = Stage
stage.Parent = stats
stage.Value = 0

script.Parent.Touched:Connect(function(plr)
     if plr.Parent:WaitForChild("Humanoid") then
          local plrs = game.Players:FindFirstChild(plr.Parent.Name)
          plrs.leaderstats.Stage.Value = plrs.leaderstats.Stage.Value + 1
      end
end

The indentation may not be correct so just type it out into a script in the checkpoint and it should work.

1 comment

0

I put it into the checkpoints and checked the indentation but it still wasn't working, i'm not sure whats up with it.

This discussion is preserved as it was. New answers, comments, and votes are closed.