Here is the code I have:
game.Players.PlayerAdded:Connect(function(player) local leaderstats = Instance.new("Folder") leaderstats.Name = "leaderstats" leaderstats.Parent = player local Searches = Instance.new("IntValue") Searches.Name = "Searches" Searches.Value = 0 Searches.Parent = leaderstats local Cash = Instance.new("IntValue") Cash.Name = "Cash" Cash.Value = 0 Cash.Parent = leaderstats end)
all the tutorials i've watched don't work, please help
i think this should be ok but the script's parent have to be ServerScriptService
game.Players.PlayerAdded:Connect(function(player) playersLeft = playersLeft + 1 local leaderstats = Instance.new("Folder") leaderstats.Name = "leaderstats" leaderstats.Parent = player local Searches = Instance.new("IntValue") Searches.Name = "Searches" Searches.Value = 0 Searches.Parent = leaderstats local Cash = Instance.new("IntValue") Cash.Name = "Cash" Cash.Value = 0 Cash.Parent = leaderstats end)