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: Anything wrong with this script?

Previous Thread :: Next Thread 
snake88usa is not online. snake88usa
Joined: 11 Jun 2010
Total Posts: 960
22 Aug 2011 10:34 PM
_G.Lane1Power = function()
if Lane1Status == 1 then
Lane1TempStatus = 1
Lane1Status = 0
Lane1BallLight1.BrickColor = BrickColor.new("Black")
Lane1BallLight2.BrickColor = BrickColor.new("Black")
Lane1PowerLight1.BrickColor = BrickColor.new("White")
Lane1PowerLight2.BrickColor = BrickColor.new("White")
end
if Lane1Status == 2 then
Lane1TempStatus = 2
Lane1Status = 0
Lane1BallLight1.BrickColor = BrickColor.new("Black")
Lane1BallLight2.BrickColor = BrickColor.new("Black")
Lane1PowerLight1.BrickColor = BrickColor.new("White")
Lane1PowerLight2.BrickColor = BrickColor.new("White")
end
if Lane1Status == 0 then
if Lane1TempStatus == 1 then
Lane1Status = 1
Lane1BallLight1.BrickColor = BrickColor.new("Really red")
Lane1BallLight2.BrickColor = BrickColor.new("Black")
Lane1PowerLight1.BrickColor = BrickColor.new("New Yeller")
Lane1PowerLight2.BrickColor = BrickColor.new("White")
end
if Lane1TempStatus == 2 then
Lane1Status = 2
Lane1BallLight1.BrickColor = BrickColor.new("Really red")
Lane1BallLight2.BrickColor = BrickColor.new("Really red")
Lane1PowerLight1.BrickColor = BrickColor.new("New Yeller")
Lane1PowerLight2.BrickColor = BrickColor.new("New Yeller")
end
end
end

It seems to ignore everything about setting the value to 1 or 2 or 0
Report Abuse
ElectricAxel is not online. ElectricAxel
Joined: 15 May 2009
Total Posts: 16239
22 Aug 2011 11:26 PM
ELSEIF PLOX:

a = false

if a == false then
a = true
end

if a == true then
a = false
end


No matter what, a will always be false if you don't use elseif. -.-


--------------------------
print(ElectricAxel)

Output: nil

Proof that I don't exist. :P
Report Abuse
nate890 is not online. nate890
Joined: 22 Nov 2008
Total Posts: 21686
22 Aug 2011 11:28 PM
^

<'eof' expected near 'end' on line 9001>
Report Abuse
ElectricAxel is not online. ElectricAxel
Joined: 15 May 2009
Total Posts: 16239
22 Aug 2011 11:29 PM
Nair spawm alert on.


--------------------------
print(ElectricAxel)

Output: nil

Proof that I don't exist. :P
Report Abuse
nate890 is not online. nate890
Joined: 22 Nov 2008
Total Posts: 21686
22 Aug 2011 11:38 PM
Also note with elseif you won't need like 10 unnecessary ends.

<'eof' expected near 'end' on line 9001>
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