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

Can't change the score on a team?

I'm not a very good scripter, but i'm trying to make something so the score of a team is how many players are in the server, I try this script, and It doesn't work, Help anyone?

local players = game.Players:GetChildren()
game.Teams.Players.Score = players

1 answer

You are attempting to set a NumberValue (score property) to a table (game.Players:GetChildren())

The length operator # would return the amount of players in this case.

local players = game.Players:GetPlayers()
game.Teams.Players.Score = #players

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