Xnite515
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 22763 |
|
|
| 10 Mar 2013 11:18 PM |
--[[ XNITE ]]--
deb = false
deb1 = false
local teamcolors = { ["SC"] = BrickColor.new("Bright blue") or BrickColor.new("Bright green"),
["Raider"] = BrickColor.new("Bright red")
}
_G["CP1"] = "nil"
script.Parent.Touched:connect(function(hit) if deb == false then deb = true if hit.Parent:findFirstChild("Humanoid") then plr = game.Players:GetPlayerFromCharacter(hit.Parent) if plr then touching = true if plr.TeamColor == teamcolors["Raider"] and script.Control.Value == BrickColor.new("Bright blue") then for i = 200, 0 , -1 do if touching == true then wait(1) print(i) else break end end _G["CP1"] = "Raiders" script.Control.Value = BrickColor.new("Bright red") print(_G["CP1"]) script.Parent.BrickColor = BrickColor.new("Bright red") deb = false elseif plr.TeamColor == teamcolors["SC"] and script.Control.Value == BrickColor.new("Bright red") then _G["CP1"] = "SC" script.Control.Value = BrickColor.new("Bright blue") print(_G["CP1"]) script.Parent.BrickColor = BrickColor.new("Bright blue") deb = false end end end end end)
script.Parent.TouchEnded:connect(function(troll) if deb1 == false then deb1 = true if troll.Parent:findFirstChild("Humanoid") then touching = false end end end) |
|
|
| Report Abuse |
|
|
|
| 11 Mar 2013 01:23 AM |
Unnecessary { ? whats the output |
|
|
| Report Abuse |
|
|
|
| 11 Mar 2013 01:26 AM |
| Why do you have so many ends when you only have one function... |
|
|
| Report Abuse |
|
|
nairod7
|
  |
| Joined: 26 Mar 2010 |
| Total Posts: 869 |
|
|
| 11 Mar 2013 06:38 AM |
@Michael1784: You need them to close conditional statements. And that '}' close the one there: 'local teamcolors = {'.
@Xnite515: The script don't do what you wanted to do when the player's a Raider or a SC ? If you don't give us any information, we may not help you... |
|
|
| Report Abuse |
|
|