Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

is it possible to make everyone a certain team?

Asked by
zValerian 108
5 years ago

is it possible to make a script that teams everyone a certain team? I found nothing on the wiki and etc

0
Yes it's possible. User#19524 175 — 5y

1 answer

Log in to vote
1
Answered by
Rare_tendo 3000 Moderation Voter Community Moderator
5 years ago

Yes, here's a script:

local certainTeam = -- team object hierachy

for _,v in pairs(game.Players:GetPlayers()) do
       v.Team = certainTeam
end
0
Don't spoon feed code. User#19524 175 — 5y
0
and was there a need to downvote? Rare_tendo 3000 — 5y
0
Yes there is. This is scripting HELPERS, he won't learn like this. User#19524 175 — 5y
0
4 lines were provided. Said 4 lines were self-documenting enough to say everything you'd need to say about the matter. It's not even like this is a totally workable solution for anything. Put this in a script and all you'd get is it running immediately at server start and not doing anything. fredfishy 833 — 5y
View all comments (9 more)
0
He asked a simple question that requires a simple answer, not code. User#19524 175 — 5y
0
Could you please explain how writing "game.Players:GetPlayers() retrieves a list of the players in the server" is in any way more descriptive than what was posted? fredfishy 833 — 5y
0
oh yeah I figured it out on my own but thanks <3 zValerian 108 — 5y
0
He got a simple answer, just in the form of code. It's literally more concise and descriptive than writing the equivalent in English could be. fredfishy 833 — 5y
0
Right. But giving code is more than enough. Why wouldn't chexyalani just give OP links, or a description of how without code? User#19524 175 — 5y
0
Because that is literally more effort than providing the code, and less useful. If you disagree, please provide a sample answer which is as descriptive, but shorter. fredfishy 833 — 5y
0
. But OP asked a simple "Is it possible to ____?" question, which requires a yes or no. It was just a yes or no question and chexy just spoon feeds code. OP will never learn like that. User#19524 175 — 5y
0
Why are you being intentionally obtuse, rather than just admitting the fact you're wrong? Obviously the implication of "is it possible to..." is "how do I...". Let's not pretend you couldn't figure that out.  The code Chex provided wouldn't even interpret as is. fredfishy 833 — 5y
0
Also given the fact that incapaz asked "Is there any other way to make a player unable to reset?" a few days ago. Was he also expecting a yes or no answer? Hm... dpark19285 375 — 5y
Ad

Answer this question