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
 

What are the symbols for 'if' statements?

Previous Thread :: Next Thread 
tuxedoman23 is not online. tuxedoman23
Joined: 24 Apr 2009
Total Posts: 4670
10 Dec 2011 04:18 PM
== Equal to
~= Not equal to

What are the other ones?
Report Abuse
joshrocks101 is not online. joshrocks101
Joined: 07 Jun 2011
Total Posts: 1712
10 Dec 2011 04:20 PM
= is to change a string

they definately don't have ++ or -- like in c++ -_-"
Report Abuse
tuxedoman23 is not online. tuxedoman23
Joined: 24 Apr 2009
Total Posts: 4670
10 Dec 2011 04:21 PM
You can change properties too. >.>

if game.Workspace.tuxedoman23.Head.Transparency == 0 then
print("I told you so >.>")
end
Report Abuse
Penguine236 is not online. Penguine236
Joined: 13 Apr 2011
Total Posts: 1303
10 Dec 2011 04:22 PM
@josh

= isn't to just change a string. Its used to set pretty much everything.
Report Abuse
joshrocks101 is not online. joshrocks101
Joined: 07 Jun 2011
Total Posts: 1712
10 Dec 2011 04:22 PM
blah (:p)
Report Abuse
Diebrox is not online. Diebrox
Joined: 17 Sep 2009
Total Posts: 4716
10 Dec 2011 04:22 PM
<
>
Report Abuse
tuxedoman23 is not online. tuxedoman23
Joined: 24 Apr 2009
Total Posts: 4670
10 Dec 2011 04:24 PM
Ah... I'm a noob. Thanks.. :)
Report Abuse
1WOOF1 is not online. 1WOOF1
Joined: 03 May 2009
Total Posts: 20682
10 Dec 2011 04:25 PM
[ Content Deleted ]
Report Abuse
Merely is not online. Merely
Joined: 07 Dec 2010
Total Posts: 17266
10 Dec 2011 04:29 PM
relational operators:

< -- less than
> -- greater than
<= -- less than or equal to
>= -- greater than or equal to
== -- equal to
~= -- not equal to

logical operators:
a and b -- both a and b
a or b -- a or b
not -- the opposite of normal

examples:
print(not nil) --> true
print(not not nil) --> false
print(5 <= 5) --> true
print("hi" == "hi") --> true

local x = game.Workspace:FindFirstChild("Part") or game.Workspace:FindFirstChild("Part2")

-- if game.Workspace.Part doesn't exist
print(x) --> Part2
-- if it does
print(x) --> Part
Report Abuse
Merely is not online. Merely
Joined: 07 Dec 2010
Total Posts: 17266
10 Dec 2011 04:30 PM
also:


local x = 5

if x < 4 then
print("a")
elseif x < 5 then
print("b")
else
print("c")
end

--> c
Report Abuse
1WOOF1 is not online. 1WOOF1
Joined: 03 May 2009
Total Posts: 20682
10 Dec 2011 04:31 PM
[ Content Deleted ]
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