guys so im making a game where you have to buy something from the shop and i keep messing up the code and im tired already and i need help
game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder",player) leaderstats.Name = "leaderstats" local cash = Instance.new("IntValue",leaderstats) cash.Name = "Gold" cash.Value = 1000
end)
Hello, have you referenced the "player" variable beforehand?
If not, try putting:
local players = game:GetService("Players")