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

How do I add a value to a player?

Asked by 7 years ago

I want to add a numbervalue into a player when the join the game, but how do i do this? Thanks.

1 answer

Log in to vote
0
Answered by 7 years ago
Edited 7 years ago
1game.Players.PlayerAdded:Connect(function (player)
2    local x = Instance.new("IntValue")
3    x.Parent = player
4    x.Name = "Put The Name of the Value here"
5    x.Value = 0 --change to the value you want it to be
6end)
0
You forgot to add a ) at the end of "end". However, it works. Thank you. CarlPlandog 20 — 7y
0
oh you are right,sorry for mistake, i will edit it. TheSkyofIndia 150 — 7y
Ad

Answer this question