Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do you make 2 team with different items?

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

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.

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)

1 comment

This discussion is preserved as it was. New answers, comments, and votes are closed.