Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

my script has orange and red lines pls tell how to fix is there any way I can fix it?

game.players.playerAdded:connect(function(plr) local stats =Instance.new("Folder"), plr) stats.name = "leaderstats"

local coins = Instance.new("IntValue"), stats) Coins.name = "Coins" Coins.value = 0

end)

1 answer

in LuaU coding, everything is case sensitive. It has to be Players, not players and it has to be PlayerAdded, not playerAdded. It's a bit annoying but you will get used to it.

so here is your script but fixed.

game.Players.PlayerAdded:Connect(function(plr)
	local stats = Instance.new("Folder",plr)
	stats.Name = "leaderstats"

	local coins = Instance.new("IntValue",stats)
	coins.Name = "Coins"
	coins.Value = 0
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.