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

Error with Function?

the goal is to create a function that whenever a player joins the value will increase by 1.

function playerEntered(Player)
game.workspace.PlrMax.value = game.workspace.PlrMax.value +1
end
game.Players.ChildAdded:connect(playerEntered)


1 answer

✓ Accepted answer

You had used ChildAdded instead of PlayerAdded and forgot to capitalize Value.

function playerEntered(Player)
game.workspace.PlrMax.Value = game.workspace.PlrMax.Value + 1
end
game.Players.PlayerAdded:connect(playerEntered)

Comment on this if it did not work

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