Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-2

On Players Join Count Script?

Asked by 8 years ago

Hi, I'd like to make a script that will give number value to player. Like when the first player join to the game then he will get number value 1 second player = number value 2 etc. I have no idea how to make that :( Can You guys help me?

1 answer

Log in to vote
1
Answered by
lucas4114 607 Moderation Voter
8 years ago
local playercount = 1

game.Players.PlayerAdded:connect(function(plr)
    local numbervalue = Instance.new("NumberValue")
    numbervalue.Parent = plr
    numbervalue.Value = playercount
    playercount = playercount + 1
end
0
Thank You :) Dominqx 0 — 8y
0
And when you need to use the number values, you would do game.Players.playername.NumberValue.Value for whatever your using it for. lucas4114 607 — 8y
Ad

Answer this question