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

Script not working,giving the killer (The Knightmare) a weopen help?

Asked by 10 years ago

THE WEOPEN IS THE FANG OF ANANSI!

function teamFromColor(color) 
for _,t in pairs(game:GetService("Teams"):GetChildren()) do 
if t.TeamColor==color then return t end 
end 
return nil 
end 

function onSpawned(plr) 
local tools = teamFromColor(plr.TeamColor):GetChildren() 
for _,c in pairs(tools) do 
c:Clone("Fang Of Anansi").Parent = plr.Backpack 
end 
end 

function onChanged(prop,plr) 
if prop=="Character" then 
onSpawned(plr) 
end 
end 

function onAdded(plr) 
plr.Changed:connect(function(prop) 
onChanged(prop,plr) 
end) 
end 

game.Players.PlayerAdded:connect(onAdded) 

Answer this question