poulsen
|
  |
| Joined: 23 Nov 2008 |
| Total Posts: 15552 |
|
|
| 14 Oct 2012 08:49 PM |
Forgeting wait(1)
If you ever do ROBLOX Studio WILL crash.
~ Let's have a Tea Party! C: ~ |
|
|
| Report Abuse |
|
|
Xnite515
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 22763 |
|
| |
|
| |
|
|
| 14 Oct 2012 09:16 PM |
print("Hi")
Whoops, I forgot a wait.
^ No, that's not how it works :/ You do not always need a wait
Lua Learners - Elite |
|
|
| Report Abuse |
|
|
poulsen
|
  |
| Joined: 23 Nov 2008 |
| Total Posts: 15552 |
|
|
| 14 Oct 2012 09:18 PM |
chaoticregandpledge,
I know, but I'm talking about "while true do".
~ Let's have a Tea Party! C: ~ |
|
|
| Report Abuse |
|
|
|
| 14 Oct 2012 09:22 PM |
i = 0 while i<50 do i = i+1 print("Hi"..tostring(i)) end
Doesn't need a wait()
Lua Learners - Elite |
|
|
| Report Abuse |
|
|
mamaguy
|
  |
| Joined: 07 Oct 2010 |
| Total Posts: 7073 |
|
|
| 14 Oct 2012 09:29 PM |
@Chaotic I don't see a 'while true do' statement/thing in your code. also, a = 0 while true do a = a + 1 end |
|
|
| Report Abuse |
|
|
|
| 14 Oct 2012 09:32 PM |
a = 0 while true do a = a + 1 if a == 10 then print("I win :D") end end
-[::ƧѡÎḾḠΰῩ::]-[::Maker of stuff and Helper of Scripting::]- |
|
|
| Report Abuse |
|
|
ungh01
|
  |
| Joined: 24 Dec 2008 |
| Total Posts: 876 |
|
|
| 14 Oct 2012 09:39 PM |
@swim That will still break..
a = 0 while true do a = a + 1 if a == 10 then print("This is the proper function. :)") break end end
|
|
|
| Report Abuse |
|
|
|
| 14 Oct 2012 09:47 PM |
Crap, you're right.
-[::ƧѡÎḾḠΰῩ::]-[::Maker of stuff and Helper of Scripting::]- |
|
|
| Report Abuse |
|
|
|
| 14 Oct 2012 09:48 PM |
| I feel like Chaotic won that |
|
|
| Report Abuse |
|
|
mamaguy
|
  |
| Joined: 07 Oct 2010 |
| Total Posts: 7073 |
|
| |
|
|
| 14 Oct 2012 09:53 PM |
Because he used a 'while' loop in a correct way without the need for a 'wait'
'while (true) do' is basically like saying 'if (true) then'
It's simply looking for a 'true' or 'false' output. |
|
|
| Report Abuse |
|
|
mamaguy
|
  |
| Joined: 07 Oct 2010 |
| Total Posts: 7073 |
|
|
| 14 Oct 2012 09:57 PM |
| Yea, except the OP meant 'while true do' where it will ALWAYS be true, where chaotic's will not always be true. |
|
|
| Report Abuse |
|
|
poulsen
|
  |
| Joined: 23 Nov 2008 |
| Total Posts: 15552 |
|
|
| 14 Oct 2012 10:06 PM |
| I'm pretty new to LUA and I just learned Functions and onTouch, so I didn't understand understand half of the replies, but it's fine! :) |
|
|
| Report Abuse |
|
|
|
| 14 Oct 2012 10:08 PM |
| First of all, it's not an acronym. It's Lua - 'Moon' in Portuguese. |
|
|
| Report Abuse |
|
|
|
| 14 Oct 2012 10:36 PM |
1. Lua is not an acronym 2. There is no such thing as onTouch |
|
|
| Report Abuse |
|
|
poulsen
|
  |
| Joined: 23 Nov 2008 |
| Total Posts: 15552 |
|
| |
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 14 Oct 2012 10:46 PM |
can't you do this:
local Lol = 0
while true do Lol = Lol + 1 if Lol >= 50 then break end end |
|
|
| Report Abuse |
|
|
|
| 14 Oct 2012 10:49 PM |
onTouch what you name your function. like this:
function onTouch(string) print(string) end
onTouch("Hi")
Output: >Hi |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 14 Oct 2012 10:50 PM |
ohh lol, i though u were saying the event.
the Brick.Touched |
|
|
| Report Abuse |
|
|
jobro13
|
  |
| Joined: 05 Aug 2009 |
| Total Posts: 2865 |
|
|
| 15 Oct 2012 06:48 AM |
Lol I know something cool too :)
script.Parent.ChildAdded:connect(function(child) child:Clone().Parent = script.Parent end)
Problem? Pity that roblox protected that :/ |
|
|
| Report Abuse |
|
|
poulsen
|
  |
| Joined: 23 Nov 2008 |
| Total Posts: 15552 |
|
|
| 15 Oct 2012 07:04 AM |
This is what I'm talking about:
function onTouch() script.Parent.CanCollide = false script.Parent.Transparency = 0.5 wait(1) script.Parent.CanCollide = true script.Parent.Transparency = 0 end
game.Workspace.Door.Touched:connect(onTouch)
Which I made up for:
http://www.roblox.com/Tea-Time-with-Poulsen-place?id=93239622
~ Let's have a Tea Party! C: ~ |
|
|
| Report Abuse |
|
|
jobro13
|
  |
| Joined: 05 Aug 2009 |
| Total Posts: 2865 |
|
|
| 15 Oct 2012 07:24 AM |
| The level of scripting is extremely high here. Facepalm. |
|
|
| Report Abuse |
|
|
|
| 15 Oct 2012 07:50 AM |
| Yus n00b.. Only l33t scriptoring nubs all0w3d |
|
|
| Report Abuse |
|
|