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

How do you give a certian tool to a team

Asked by 10 years ago

I had a glimpse of an idea, but I tried it and roblox crashed. Can anyone help?

3 answers

Log in to vote
3
Answered by
Azarth 3141 Moderation Voter Community Moderator
10 years ago
local tool = game.ReplicatedStorage["ToolName"]
local team = BrickColor.new("Bright red")

for i,v in pairs(game.Players:GetPlayers()) do 
    if v.TeamColor == team then
        tool:Clone().Parent = v.Backpack
        tool:Clone().Parent = v.StarterGear
    end
end

for loops

TeamColor

Ad
Log in to vote
0
Answered by 10 years ago

I wild check it out and it's legit! Thank you.

0
Please refrain from using answers to reply to another user's answer. That's what comments are for. Thewsomeguy 448 — 10y
Log in to vote
0
Answered by
Shawnyg 4330 Trusted Badge of Merit Snack Break Moderation Voter Community Moderator
10 years ago

If you don't want to do it by scripting, you could simply drag the tool into the team. Of course, the team would be placed in Teams.

Answer this question