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
 

Re: TouchEnded no work?

Previous Thread :: Next Thread 
Xnite515 is not online. 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
michael1784 is not online. michael1784
Joined: 15 Feb 2011
Total Posts: 3322
11 Mar 2013 01:23 AM
Unnecessary { ?
whats the output
Report Abuse
michael1784 is not online. michael1784
Joined: 15 Feb 2011
Total Posts: 3322
11 Mar 2013 01:26 AM
Why do you have so many ends when you only have one function...
Report Abuse
nairod7 is not online. 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
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