|
| 04 Sep 2013 11:13 PM |
It isn't working, it spawns the tool on join, rather than on reset, so when you change teams, it gets all messed up, can anyone fix this?
redtools={"RedKatana"} bluetools={"YellowKatana"} -- (Yellow) -------------------------------------------------------------------------------------------------------------------------------------------
function spawn(SP) if SP.Neutral then if SP.TeamColor==BrickColor.new("Bright red") then for i=1, #redtools do local tool=game.Lighting:FindFirstChild(redtools[i]) if tool~=nil then tool:clone().Parent=SP.Backpack end end end if SP.TeamColor==BrickColor.new("Bright yellow") then for i=1, #bluetools do local tool=game.Lighting:FindFirstChild(bluetools[i]) if tool~=nil then tool:clone().Parent=SP.Backpack end end end end end
function onPlayerEntered(NewPlayer) newPlayer.Changed:connect(function(C) if C=="Character" then spawn(NewPlayer) end end) end
game.Players.ChildAdded:connect(onPlayerEntered)
~!!ECHO ECHO ECHO ECHO!!~ |
|
|
| Report Abuse |
|
| |
|
| 04 Sep 2013 11:16 PM |
There is no output?
~!!ECHO ECHO ECHO ECHO!!~ |
|
|
| Report Abuse |
|
|
| 04 Sep 2013 11:19 PM |
| Why do you have to If statements in a row? |
|
|
| Report Abuse |
|