turboostt
(turboostt)
November 9, 2022, 1:26pm
#1
What do you want to achieve? Keep it simple and clear!
I’m trying to check if a team has less than 10 player
What is the issue? Include screenshots / videos if possible!
the function below:
if #game.Teams.Playing:GetPlayers() > 10 then
print("test")
end
when played, it doesn’t print
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
its up there
you are actually checking whether the team has more then 10 players you should type “<” instead of “>”
PastDays
(PastDays)
November 9, 2022, 1:38pm
#3
What you are doing here is checking if there is more than 10, if 10 is the maximum you want to check for you should use “<” , which is less than, you might also want to make sure you include the 10th by seeing if its less than or equal to 10 players.
if #game.Teams.Playing:GetPlayers() <= 10 then
print("test")
end
local __MAXNUMS = 10
for d, nums in ipairs(#game:GetService("Teams").Playing:GetPlayers()) do
if nums <= __MAXNUMS then
print()
end
end
You could also use GetPropertyChangedSignal
since it works with Teams.
turboostt
(turboostt)
November 10, 2022, 2:24am
#5
Man, im very bad at maths
tysm for the replies though
system
(system)
Closed
November 24, 2022, 2:25am
#6
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.