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

Team only tool giver?

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!

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)

2 comments

0

where could i post questions like this?

0

Where do i put the tool?

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