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

How do i make it so specific teams have specific gear?

i need someone to help me out if u cant explain on here explain on my discord mikwbm#8463

1 comment

0

it will depent. Does it starts with character or is it collectable?

1 answer

First, we will need to loop through the players.

for i,v in pairs(game.Players:GetChildren() do
	
end

Then, we detect the team that the player is on.

for i,v in pairs(game.Players:GetChildren() do
	if v.Team == (team) then --Is the player on this team?

	end
end

Finally, insert the tool. You can have a tool in ReplicatedStorage or insert it via the script, as well.

for i,v in pairs(game.Players:GetChildren() do
	if v.Team == (team) then --Is the player on this team?
		local tool = game.ReplicatedStorage.Tool:Clone()
		tool.Parent = player.Backpack
	end
end

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