I need help building a team only tool giver I wanna be able to set the to a specific team to the giver and so when a player touches it, only the people with the same team color as the giver is set to can take it. I also want it to set it to their starter pack. I have no idea how to even start building this can I get so help? it would be great!
✓ ANSWER ACCEPTED
Team only tool giver?
1 answer
✓ Accepted answer
You could check the team color or the team name.
Also you should refrain from posting requests here. If you have a more specific question people will be more than happy to help.
local Part = script.Parent --Part to get touched
local Tool = ????? --The tool you want to give them
local TeamColor = "BrightBlue" --Team color here
Part.Touched:connect(function(hit)
local Player = game.Players:GetPlayerFromCharacter(hit.Parent)
if Player and Player.TeamColor == BrickColor.new(TeamColor) then
Tool:Clone().Parent = Player.Backpack
Tool:Clone().Parent = Player.StarterGear
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
where could i post questions like this?
Where do i put the tool?