Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Team only tool giver?

Asked by 10 years ago

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

Log in to vote
1
Answered by 10 years ago

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)
0
where could i post questions like this? MULTACxlr8 20 — 10y
0
Where do i put the tool? MULTACxlr8 20 — 10y
Ad

Answer this question