its not showing up
local function onPlayerJoin(player) local leaderstats = Instance.new("Folder") leaderstats.Name = "leaderstats" leaderstats.Parent = player local gold = Instance.new("IntValue") gold.Name = "Kevinrux" gold.Value = 0 gold.Parent = leaderstats end
its not showing up on the screen when i test play
You forgot to call the function when a player joins, so you might do something like this
game.Players.PlayerAdded:Connect(function(player) local leaderstats = Instance.new("Folder") leaderstats.Name = "leaderstats" leaderstats.Parent = player local gold = Instance.new("IntValue") gold.Name = "Kevinrux" gold.Value = 0 gold.Parent = leaderstats end)
I think you forgot to call/connect the function. Try this:
local Players = game:GetService("Players") Players.PlayerAdded:Connect(function(player) local leaderstats = Instance.new("Folder") leaderstats.Name = "leaderstats" leaderstats.Parent = player local gold = Instance.new("IntValue") gold.Name = "Kevinrux" gold.Value = 0 gold.Parent = leaderstats end)