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

Answer this question