|
| 02 Feb 2013 08:04 PM |
This makes it so that only the raiders can cross the lake. There's no output, but it doesn't work
raiders = game.Teams.Raiders players = game.Players x = game.Players:GetChildren()
function raiderslake(part) guy = part.Parent.Name if game.Players.guy ~= nil then for i = 1, x do if x[i].Name == guy then if x[i].TeamColor == "Raiders" then end else if x[i].TeamColor == "Nightingale Legion" then guy.Parent:BreakJoints() end end end end end |
|
|
| Report Abuse |
|
|
|
| 02 Feb 2013 08:07 PM |
| You need to use Touched event |
|
|
| Report Abuse |
|
|
| |
|
|
| 02 Feb 2013 08:12 PM |
| Stuff like that happens to me all the time |
|
|
| Report Abuse |
|
|
| |
|
|
| 02 Feb 2013 08:28 PM |
raiders = game.Teams.Raiders players = game.Players x = game.Players:GetChildren()
function raiderslake(part) guy = part.Parent.Name if game.Players[guy] ~= nil then for i = 1, #x do if x[i].Name == guy then if x[i].TeamColor == "Raiders" then end else if x[i].TeamColor == "Nightingale Legion" then part.Parent:BreakJoints() end end end end end
-- Here are some revisions. |
|
|
| Report Abuse |
|
|
|
| 02 Feb 2013 08:31 PM |
| Now all I have to do now is watch 2 guys fight over some errors until I get a working script. |
|
|
| Report Abuse |
|
|
| |
|
|
| 03 Feb 2013 02:01 PM |
Nvm
raiders = game.Teams.Raiders players = game.Players x = game.Players:GetChildren()
function raiderslake(part) guy = part.Parent.Name if game.Players.guy ~= nil then for i = 1, x do if x[i].Name == guy then if x[i].TeamColor == raiders.TeamColor then end else if x[i].TeamColor ~= raiders.TeamColor then guy.Parent:BreakJoints() end end end end end
|
|
|
| Report Abuse |
|
|
| |
|
|
| 03 Feb 2013 07:07 PM |
raiders = Game.Teams.Raiders players = Game.Players x = players:GetChildren()
function raiderslake(part) if players:GetPlayerFromCharacter(part.Parent) then local player = players:GetPlayerFromCharacter(part.Parent) if player.TeamColor = raiders.TeamColor then print "Raider" elseif player.TeamColor ~= raiders.TeamColor then part.Parent:BreakJoints() end end end
Make sure you run it. |
|
|
| Report Abuse |
|
|
| |
|
|
| 03 Feb 2013 07:22 PM |
'for i = 1,x' shouldn't that be #x?
-bigdaddy92, Professional Web Developer & Master Scripter |
|
|
| Report Abuse |
|
|