mcas1996
|
  |
| Joined: 05 Jun 2013 |
| Total Posts: 161 |
|
|
| 21 Jan 2014 09:17 PM |
| If someone can give me a really basic test on scripting. Keep in mind that i just got to the if then commands. I would really appreciate it. |
|
|
| Report Abuse |
|
|
|
| 21 Jan 2014 09:17 PM |
a = true and false or nil
What is a? |
|
|
| Report Abuse |
|
|
mcas1996
|
  |
| Joined: 05 Jun 2013 |
| Total Posts: 161 |
|
|
| 21 Jan 2014 09:18 PM |
| a is the variable that equals it. and yeah i haven't got to the nil stuff yet. |
|
|
| Report Abuse |
|
|
|
| 21 Jan 2014 09:20 PM |
| Oh, and while you're at it, explain why. |
|
|
| Report Abuse |
|
|
|
| 21 Jan 2014 09:20 PM |
| No, I mean if it is true, false, or nil. Nil means nothing and is not considered truthy. |
|
|
| Report Abuse |
|
|
shawnyg
|
  |
| Joined: 21 Apr 2011 |
| Total Posts: 1428 |
|
|
| 21 Jan 2014 09:20 PM |
script.Parent.Touched:connect(function(hit) if hit.Name = "Bob" then
Now, fill it in so that it kicks the player. Hmm, let me make it simple. So it kills the player
~Hope I helped, if you need a script, PM me. ~Glory to CAT!~ ~CAT General Shawnyg~ |
|
|
| Report Abuse |
|
|
mcas1996
|
  |
| Joined: 05 Jun 2013 |
| Total Posts: 161 |
|
|
| 21 Jan 2014 09:23 PM |
a = true and false or nil
a is the variable that equals true and false or nil.
i'm guessing by explain it you mean this? a = true and false or nil because it's what you chose the variable to be?
true = on flase = off nil = both?(guessing) |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 21 Jan 2014 09:24 PM |
true = true not true = false nil = nil not nil = true not not nil = false
"a = true and false or nil" Expect a to always be nil (false or nil = nil) |
|
|
| Report Abuse |
|
|
mcas1996
|
  |
| Joined: 05 Jun 2013 |
| Total Posts: 161 |
|
|
| 21 Jan 2014 09:25 PM |
| oh so basically since true = false, they're both false, or nil? |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 21 Jan 2014 09:26 PM |
true and false or nil
Well what would happen here is: if it's true, it would become false, which would become nil if it's false, it would become nil |
|
|
| Report Abuse |
|
|
|
| 21 Jan 2014 09:27 PM |
| a = nil because and checks if the first argument is truthy, and if so returns the second one. true and false returns false, and if the first argument of or is not truthy then it returns the next argument, which is nil. |
|
|
| Report Abuse |
|
|
mcas1996
|
  |
| Joined: 05 Jun 2013 |
| Total Posts: 161 |
|
| |
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|
mcas1996
|
  |
| Joined: 05 Jun 2013 |
| Total Posts: 161 |
|
|
| 21 Jan 2014 09:29 PM |
| alright, so can somebody give me another test? |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 21 Jan 2014 09:32 PM |
local isValid = ( ( Game.Workspace.Terrain ~= nil and true and not nil and Game.FindFirstChild and not false and Game.Destroy ) or "lol'd" ) |
|
|
| Report Abuse |
|
|
mcas1996
|
  |
| Joined: 05 Jun 2013 |
| Total Posts: 161 |
|
|
| 21 Jan 2014 09:35 PM |
| yeah i'll just go back to LuaLearners and re-read it all xD |
|
|
| Report Abuse |
|
|