darkwisp
|
  |
| Joined: 07 Apr 2010 |
| Total Posts: 22653 |
|
|
| 19 Dec 2013 07:15 PM |
I capture the terminal and it goes to one teams color but when I capture on another team WHILE it is captured by the previous team it won;t capture.
----------------------------------------- TCpoints = game.Workspace.TCpoints.Value Hpoints = game.Workspace.Hpoints.Value team = script.Parent flag = script.Parent.Parent.Flag pole = script.Parent.Parent.Pole function onTouch(hit) local user = game.Players:GetPlayerFromCharacter(hit.Parent) if user ~= nil then if team.BrickColor ~= user.TeamColor then team.BrickColor = user.TeamColor else team.BrickColor = nil end flag.BrickColor = user.TeamColor pole.Handles.Color = user.TeamColor
if team.BrickColor == BrickColor.new("Bright violet") then TCcaptured = false wait() TCcaptured = true print("Captured") end
if team.BrickColor == BrickColor.new("Really red") then Hcaptured = false wait() Hcaptured = true end
while TCcaptured do wait(.3) TCpoints = TCpoints + 1 game.Workspace.TCpoints.Value = TCpoints print(TCpoints) end
while Hcaptured do wait(.3) Hpoints = Hpoints + 1 game.Workspace.Hpoints.Value = Hpoints print(TCpoints) end
if TCpoints == 10 then print("TCpoints has reached limit") end
end end
script.Parent.Touched:connect(onTouch) ----------------------------- Hello Collisionists! |
|
|
| Report Abuse |
|
darkwisp
|
  |
| Joined: 07 Apr 2010 |
| Total Posts: 22653 |
|
| |