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

Specific Team Tool Giver. Any Help?

Asked by 8 years ago

I am looking for a script that can give a certain team a specific weapon without a brick needing to be touched or clicked. I am looking to give the Bright red Team A knife, and the Bright blue team a pistol. The knife and the pistol are both located inside ServerStorage. The knife and pistol need to be put into the players backpacks with it saving so when they die they lose the weapons. (No put weapons in team name scripts)

BrickColor.new("Bright blue") 

BrickColor.new("Bright red") 

Or

BrickColor.Blue --Transmutes to Bright blue 

BrickColor.Red --Transmutes to Bright red 

game.ServerStorage.Knife:Clone() 

game.ServerStorage.Pistol:Clone() 

-I have tried many times at this but I could never get it work. The only thing I got to work was touching a button.

off = false 

function Ontouch(hit) 

if off == false then 

off = true 

if hit.Parent:findFirstChild("Humanoid") ~= Team.BrickColor.Red then 
local c = script.Parent.Parent.Tools:getChildren() 
for i = 1, #c do 
if c[i].className == "HopperBin" or "Tool" then 
c[i]:clone().Parent = game.Players:findFirstChild(hit.Parent.Name).Backpack 
wait() 
off = true 
end 
end 
end 
end 
end  
script.Parent.touched:connect(Ontouch) 

Answer this question