I very small knowledge on how to use Tables. From what I have seen in other scripts, this seems what it would look like, i'm not sure. Could someone tell me if this is right, and if not, tell me what to change?
allies=15124, 23235, 23523, 1234, 5235
while true do
TDS=game.Workspace.TDS
hos=game.Workspace.hos
wait()
game.Players.PlayerAdded:connect(function(plr)
if plr:IsInGroup(374223) then
TDS.Value=TDS.Value+1
elseif plr:IsInGroup(allies) then
else
hos.Value=hos.Value+1
end
end)
end

8 comments
So then I would put if allied==true then -- code here ?
Yes. Or, to be shorter and clearer, just
if allied thenI originally posted 'if allied then' but I just used what I know. Thanks for the help
I encountered a problem. I had a print(" Hey an ally") in it if they were an ally, and I tested, and it printed 5 times (One for each ally group) Should that happen?
No. I'm guessing you put the print statement inside of the for loop. It has to happen after since you only know the final verdict once you've checked every group.
oh, thanks!
It might save some comparisons to add a break statement inside the loop for if allied is true, since you don't have to check if they're in another of the groups if you know that they're already allied.
@adark That's true, though the list should be short enough it doesn't really matter; adding the branch might be more expensive. I didn't want to make it any more complicated than it needed to be either for this example