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: Buttons,

Previous Thread :: Next Thread 
100465 is not online. 100465
Joined: 17 Jun 2010
Total Posts: 6353
10 Aug 2013 03:47 PM
Lets say I wanted a light, Press button once, Turns on. Press again, Turns off.

How do. Just need simple explanation, not whole thing.

I ran out of siggies, (Again)
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
10 Aug 2013 03:52 PM
Its pretty simple.

use the not operator. It reverses the value. So not true == false and not false == true.

so

Thing.Property = not Thing.Property

if it is true then it == not true which is false.
Report Abuse
kingmatt2 is not online. kingmatt2
Joined: 20 Aug 2011
Total Posts: 6494
10 Aug 2013 03:54 PM
F = true
function Clicked()
if F then
--CODE
F = false
else
--CODE
F = true
end
end
script.Parent.MouseButton1Click:connect(Clicked) -- Wrong connection line! Sorry.
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
10 Aug 2013 03:56 PM
WHY...Use teh not operator!!!!!!!!!
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