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 3 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
3 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.

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)
Ad

Answer this question