I’m attempting to use game.Teams[“TeamName”]:GetPlayers() to see if there is any player on a specific team in a certain radius.
I have created 2 teams under game.Teams, one called “Hostiles” and another called “Group”.
I’m using the following code:
for i,v in game.Teams.Hostiles:GetPlayers()
print(v)
print(v.Team)
end
Expected behavior
The code shown above is printing my player instance, even if I am allocated to a different team.
I’m expecting it only to print v and v.Team if v.Team is Hostiles, but it is possible to get the print “CmeRuler” “Group”.