skate1011
|
  |
| Joined: 13 Mar 2010 |
| Total Posts: 688 |
|
|
| 23 Oct 2012 07:30 PM |
So I was wondering if this was right nollie.Value = not nollie.Value
wiki.roblox.com |
|
|
| Report Abuse |
|
|
| |
|
|
| 23 Oct 2012 07:33 PM |
No... The not operator is used to check if something is opposite. Like heres an example.
Value = false if not Value == true then print 'yolo' end
--> yolo
~thedestroyer115, check out my sets!~ |
|
|
| Report Abuse |
|
|
|
| 23 Oct 2012 07:34 PM |
@OP You can do that only with bool values
a = false
a = not a print(a) >true
-[::ƧѡÎḾḠΰῩ::]-[::Maker of stuff and Helper of Scripting::]- |
|
|
| Report Abuse |
|
|
skate1011
|
  |
| Joined: 13 Mar 2010 |
| Total Posts: 688 |
|
|
| 23 Oct 2012 07:35 PM |
It is a bool value.
wiki.roblox.com |
|
|
| Report Abuse |
|
|
|
| 23 Oct 2012 07:35 PM |
This is very useful if checking for an object exists. Lets say I wanted to parent a part to workspace if yolo didn't exist.
if not game.Workspace:findFirstChild("yolo") then Instance.new("Part", game.Workspace) end
~thedestroyer115, check out my sets!~ |
|
|
| Report Abuse |
|
|
|
| 23 Oct 2012 07:35 PM |
This is a sample from my current project
function setTeam() local bool = false for i,v in pairs(game.Players:GetPlayers()) do if bool then v.TeamColor = game.Teams[tOne].TeamColor bool = not bool else v.TeamColor = game.Teams[tTwo].TeamColor bool = not bool end end end
Pretty sure you can use that. |
|
|
| Report Abuse |
|
|
skate1011
|
  |
| Joined: 13 Mar 2010 |
| Total Posts: 688 |
|
|
| 23 Oct 2012 07:36 PM |
"OP" please get out. It was a simple question.
wiki.roblox.com |
|
|
| Report Abuse |
|
|
|
| 23 Oct 2012 07:39 PM |
What?
-[::ƧѡÎḾḠΰῩ::]-[::Maker of stuff and Helper of Scripting::]- |
|
|
| Report Abuse |
|
|
| |
|
|
| 23 Oct 2012 07:46 PM |
The not operator acts like a negative sign, except with any value. When you use the not operator, you "negate the truth" of that value. In Lua, truth values are as follows:
false - nil, false true - everything else
Which means:
not "String" --> false not false --> true not nil --> true not 0 --> false not 0==1 --> not false --> true
Basically, when you "negate the truth" of a value, you simple take its boolean counterpart and use the opposite.
function toBoolean(Value) return not not Value end
This works because:
toBoolean("string") --> not not "string" --> not false --> true toBoolean(nil) --> not not nil --> not true --> false |
|
|
| Report Abuse |
|
|
skate1011
|
  |
| Joined: 13 Mar 2010 |
| Total Posts: 688 |
|
|
| 23 Oct 2012 07:50 PM |
Do you even know what "OP" means? Because if you don't, then don't use it.
wiki.roblox.com |
|
|
| Report Abuse |
|
|
|
| 23 Oct 2012 08:17 PM |
OP means Original Poster, aka the person who created the thread.
-[::ƧѡÎḾḠΰῩ::]-[::Maker of stuff and Helper of Scripting::]- |
|
|
| Report Abuse |
|
|
|
| 23 Oct 2012 08:20 PM |
skate, please tell me who said that...
http://www.roblox.com/CeaselessSouls-Admin-Commands-Gui-based-item?id=92856199 -- Take one and enjoy! Read the description, has a lot of information. |
|
|
| Report Abuse |
|
|
| |
|
|
| 23 Oct 2012 08:27 PM |
I don't think the OP is stalking you, Chop, but I know for a fact you're stalking me AGAIN. Please go away, little kid.
http://www.roblox.com/CeaselessSouls-Admin-Commands-Gui-based-item?id=92856199 -- Take one and enjoy! Read the description, has a lot of information. |
|
|
| Report Abuse |
|
|
|
| 23 Oct 2012 08:28 PM |
| Hmm, your boyfriend is like 10, don't talk about little kids. |
|
|
| Report Abuse |
|
|
|
| 23 Oct 2012 08:29 PM |
Just stop. I've answered the question. Move on.
@Chop That was UNCALLED for. |
|
|
| Report Abuse |
|
|
| |
|
|
| 23 Oct 2012 08:32 PM |
Chop, that was a bit uncalled for, either way, you're statement in 'invalid'. There's no proof I like guys. If you're referring to mamaguy, he's just a friend, try to get some. I mean you're just a raging tyke. You say other people's statements are invalid, but yours are invalid. Get real and stop being a hypocrite.
http://www.roblox.com/CeaselessSouls-Admin-Commands-Gui-based-item?id=92856199 -- Take one and enjoy! Read the description, has a lot of information. |
|
|
| Report Abuse |
|
|
mamaguy
|
  |
| Joined: 07 Oct 2010 |
| Total Posts: 7073 |
|
|
| 23 Oct 2012 08:32 PM |
@Chop, This just proves your stupidity, immaturity, and lack of memory 11, 12 in two months
|
|
|
| Report Abuse |
|
|
|
| 23 Oct 2012 08:37 PM |
I said STOP. Knock it off.
Before I call Reese and tell her I want to be a Forum Mod. |
|
|
| Report Abuse |
|
|
|
| 23 Oct 2012 08:38 PM |
Lol, wow.
http://www.roblox.com/CeaselessSouls-Admin-Commands-Gui-based-item?id=92856199 -- Take one and enjoy! Read the description, has a lot of information. |
|
|
| Report Abuse |
|
|
|
| 23 Oct 2012 09:13 PM |
It simply negates a boolean.
not true > false not false > true not not true > true
Just like negating numbers:
-(1) = -1 -(-1) = 1 |
|
|
| Report Abuse |
|
|