generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Why wont this capture away from?

Previous Thread :: Next Thread 
darkwisp is not online. 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 is not online. darkwisp
Joined: 07 Apr 2010
Total Posts: 22653
19 Dec 2013 07:19 PM
b1

Hello Collisionists!
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image