|
| 10 Dec 2011 04:18 PM |
== Equal to ~= Not equal to
What are the other ones? |
|
|
| Report Abuse |
|
|
|
| 10 Dec 2011 04:20 PM |
= is to change a string
they definately don't have ++ or -- like in c++ -_-" |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 10 Dec 2011 04:22 PM |
@josh
= isn't to just change a string. Its used to set pretty much everything. |
|
|
| Report Abuse |
|
|
| |
|
Diebrox
|
  |
| Joined: 17 Sep 2009 |
| Total Posts: 4716 |
|
| |
|
|
| 10 Dec 2011 04:24 PM |
| Ah... I'm a noob. Thanks.. :) |
|
|
| Report Abuse |
|
|
1WOOF1
|
  |
| Joined: 03 May 2009 |
| Total Posts: 20682 |
|
| |
|
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
|
  |
| 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
|
  |
| Joined: 03 May 2009 |
| Total Posts: 20682 |
|
| |
|