Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 4 years ago

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

Log in to vote
1
Answered by
NGC4637 602 Moderation Voter
4 years ago

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.

1game.Players.PlayerAdded:Connect(function(plr)
2    local stats = Instance.new("Folder",plr)
3    stats.Name = "leaderstats"
4 
5    local coins = Instance.new("IntValue",stats)
6    coins.Name = "Coins"
7    coins.Value = 0
8end)
Ad

Answer this question