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

How do you make a 'team full' function script?

Hi! I'm making a game with teams where the players can choose their team, but I don't want that one team has 10 players and one team 2 players.

Does someone know what script I need to make it?

PS: If my English is bad, It's because I'm from another country.

3 comments

0

@programmerHere is rude

0

Not rude, there is no attempt. Don't be stupid

1 answer

the following should work

local  team;
int  max_players_on_team = 10;

if (#team:GetPlayers() > max_players_on_team)
	cout<<"Team full";
else
	cout<<"team not full";
end

2 comments

0

sorrym change cout<<x; to print(x), and int to local.. I've ben coding quite a lot in C++ lately and I am tired AF, so sorry for the C++ syntax

0

-1 for confusing user with syntax from other languages, he knows absolutely nothing, for spoonfeeding and for excluding braces from control structures

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