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

How do you make 2 team with different items?

Asked by 10 years ago

How do you make 2 team with different items because i want a hyperbike and a hyperlaser gun in the other but i want one as red and the other team as blue , even though i know how to change the colour i just need to know how to put it.

Please answer ~Yours Sincerely fall4ever

2 answers

Log in to vote
0
Answered by 10 years ago

You need to place the items in some sort of storage, like the Lighting or the ServerStorage. Then you need to make a script that gives players the item specific to their team when they respawn.

This can be done like so:

game.Players.PlayerAdded:connect(function(p) -- When a player is added
    p.CharacterAdded:connect(function() -- When the new player's character is added (respawned)
        wait(1) -- Wait for teams, just in case
        if p.TeamColor == game.Teams["Team 1 Name"].TeamColor then -- If they are on team 1
            game.Lighting["Team 2 Tool Name"]:Clone().Parent = p.Backpack -- Clone tool 1
        elseif p.TeamColor == game.Teams["Team 2 Name"].TeamColor then -- If they are on team 2
            game.Lighting["Team 2 Tool Name"]:Clone().Parent = p.Backpack -- Clone tool 2
        end
    end)
end)

You need to configure this script to meet your needs.

Ad
Log in to vote
0
Answered by 10 years ago

Well you can Also do something Much Easier. All you have to do is take What ever Tools you want to have on a team and go into the Teams Area ( Teams Names with Soccer Balls) And place the tools inside that (Example)

Answer this question