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

how do i give gears to a team i want?

So there's a team called Red and Blue , Red have Sword, Blue have Gun, so , how do i do that?

1 answer

✓ Accepted answer

Put the weapons in ServerStorage, call the gun "Gun", and the sword "Sword", then try this. Put the script in ServerScriptService.

game.Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(char)
		if plr.Team = game.Teams.Red then
			local sword = game.ServerStorage:FindFirstChild("Sword")
			sword.Parent = plr.Backpack
		elseif plr.Team == game.Teams.Blue then
			local gun = game.ServerStorage:FindFirstChild("Gun")
			gun.Parent = plr.Backpack
		end
	end
end)

3 comments

1

that wont work.. always, because maybe he has a game where they stay at a neutral team at the begining and then switch teams!

0

Good point

0

I have an auto switch team for group members, but there's a neutral team where people are cillivan , how do i fix that?

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