drmiewlo
|
  |
| Joined: 14 Mar 2012 |
| Total Posts: 1782 |
|
|
| 29 Oct 2011 08:48 AM |
Supposed to teleport player to one place if the first if is true, and another place if the first is false, and the second is true. It always does the second one even if the first value is true
if workspace.TR1.InUse.Value == false then --teleportation code elseif workspace.TR2.InUse.Value == false then --teleportation elseif workspace.TR3.InUse.Value == false then --tele code end |
|
|
| Report Abuse |
|
|
drmiewlo
|
  |
| Joined: 14 Mar 2012 |
| Total Posts: 1782 |
|
| |
|
|
| 29 Oct 2011 08:59 AM |
if workspace.TR1.InUse.Value == false then --teleportation code if workspace.TR2.InUse.Value == false then --teleportation if workspace.TR3.InUse.Value == false then --tele code end end end
you might have to add on a few more ends, or take some off, just check the output. im still a little guessy on if then ends. and, this script may not work, i think it will though |
|
|
| Report Abuse |
|
|
drmiewlo
|
  |
| Joined: 14 Mar 2012 |
| Total Posts: 1782 |
|
| |
|
drmiewlo
|
  |
| Joined: 14 Mar 2012 |
| Total Posts: 1782 |
|
| |
|
drmiewlo
|
  |
| Joined: 14 Mar 2012 |
| Total Posts: 1782 |
|
| |
|
churroboy
|
  |
| Joined: 20 Aug 2008 |
| Total Posts: 2231 |
|
|
| 29 Oct 2011 09:11 AM |
The answer is not making a new thread. That is spam.
Your explanation is too vague. |
|
|
| Report Abuse |
|
|
drmiewlo
|
  |
| Joined: 14 Mar 2012 |
| Total Posts: 1782 |
|
|
| 29 Oct 2011 09:15 AM |
Ok smart one, tell me what else I need to tell you, I put another one up because for some reason people respond to 'Need an answer' more that 'elseif' and since roblox always shows your posts on the front page, you never know when it dies. |
|
|
| Report Abuse |
|
|
churroboy
|
  |
| Joined: 20 Aug 2008 |
| Total Posts: 2231 |
|
|
| 29 Oct 2011 09:17 AM |
"If the first if is true" is too vague.
If the first expression evaluated to true, then the first block would run and the rest would be skipped. |
|
|
| Report Abuse |
|
|
drmiewlo
|
  |
| Joined: 14 Mar 2012 |
| Total Posts: 1782 |
|
|
| 29 Oct 2011 09:25 AM |
Ok here: if workspace.TR1.InUse.Value == false then --tele code elseif workspace.TR2.InUse.Value == false then --tele code else if workspace.TR3.InUse.Value == false then --tele code end |
|
|
| Report Abuse |
|
|
drmiewlo
|
  |
| Joined: 14 Mar 2012 |
| Total Posts: 1782 |
|
|
| 29 Oct 2011 09:27 AM |
Oh wait, you meant the first part, not the script.
If TR1.InUse.Value ~= false then player is supposed to teleport there, if not it moves onto TR2, if TR2.Value ~= false also then it teleports you to TR3 |
|
|
| Report Abuse |
|
|
drmiewlo
|
  |
| Joined: 14 Mar 2012 |
| Total Posts: 1782 |
|
| |
|
drmiewlo
|
  |
| Joined: 14 Mar 2012 |
| Total Posts: 1782 |
|
|
| 29 Oct 2011 09:34 AM |
| Wouldn't be asking this if there was more lua documentation, so thumbs up for more documentation. |
|
|
| Report Abuse |
|
|
drmiewlo
|
  |
| Joined: 14 Mar 2012 |
| Total Posts: 1782 |
|
|
| 29 Oct 2011 09:37 AM |
| come on, don't quit on me. |
|
|
| Report Abuse |
|
|
churroboy
|
  |
| Joined: 20 Aug 2008 |
| Total Posts: 2231 |
|
|
| 29 Oct 2011 09:43 AM |
| Lua.org has good documentation. |
|
|
| Report Abuse |
|
|
grimm343
|
  |
| Joined: 18 Sep 2008 |
| Total Posts: 2796 |
|
|
| 29 Oct 2011 10:00 AM |
if not workspace.TR1.InUse.Value then --tele code elseif not workspace.TR2.InUse.Value then --tele code elseif not workspace.TR3.InUse.Value then --tele code end |
|
|
| Report Abuse |
|
|
grimm343
|
  |
| Joined: 18 Sep 2008 |
| Total Posts: 2796 |
|
|
| 29 Oct 2011 10:02 AM |
| If that does not work, then you are either not using this correctly; you made an error in the 'tele code' areas; or you made a mistake setting up your BoolValues. |
|
|
| Report Abuse |
|
|
drmiewlo
|
  |
| Joined: 14 Mar 2012 |
| Total Posts: 1782 |
|
|
| 29 Oct 2011 04:46 PM |
| I feel stupid, I accidentaly put the change value to true before the tele code. |
|
|
| Report Abuse |
|
|