Hello,
I have trouble with my code and I can’t seem to find the problem…
The following code is located in ServerScriptService and is supposed to create new values in a player folder upon their arrival.
game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player
local WhiteBall1 = Instance.new("IntValue")
WhiteBall1.Name = "WhiteBall 1"
WhiteBall1.Parent = leaderstats
local WhiteBall2 = Instance.new("IntValue")
WhiteBall2.Name = "WhiteBall 2"
WhiteBall2.Parent = leaderstats
local WhiteBall3 = Instance.new("IntValue")
WhiteBall3.Name = "WhiteBall 3"
WhiteBall3.Parent = leaderstats
local WhiteBall4 = Instance.new("IntValue")
WhiteBall4.Name = "WhiteBall 4"
WhiteBall4.Parent = leaderstats
local WhiteBall5 = Instance.new("IntValue")
WhiteBall5.Name = "WhiteBall 5"
WhiteBall5.Parent = leaderstats
local SuperBall = Instance.new("IntValue")
SuperBall.Name = "SuperBall"
SuperBall.Parent = leaderstats
end)
Thank you for your help