|
| 26 Mar 2012 05:32 AM |
[Object].[Event]:connect([Function])
|
|
|
| Report Abuse |
|
|
|
| 26 Mar 2012 05:35 AM |
| yes, exept if there is something idk . |
|
|
| Report Abuse |
|
|
iCookieNL
|
  |
| Joined: 24 May 2009 |
| Total Posts: 1103 |
|
|
| 26 Mar 2012 05:36 AM |
its
Object.Event:connect(Function)
or
Object.Event:connect(Function in Here.) |
|
|
| Report Abuse |
|
|
|
| 26 Mar 2012 05:39 AM |
[Object].[Event]:connect([Function])
Object.Event:connect(Function)
Object.Event:connect(Function in Here.)
are all basicly the same
Object . Event : connect ( function ) |
|
|
| Report Abuse |
|
|
iCookieNL
|
  |
| Joined: 24 May 2009 |
| Total Posts: 1103 |
|
|
| 26 Mar 2012 05:42 AM |
there is a difference between
Function and Function in here
Function =
function arta() print("haha") end
Object.Touched:connect(arta)
Function In Here =
Object.Touched:connect(function() print("haha") end) |
|
|
| Report Abuse |
|
|
|
| 26 Mar 2012 05:44 AM |
nope its still the same
:connect() and function inside there :P (I knew what you meant when I posted that. but its still the same general form :P) |
|
|
| Report Abuse |
|
|
iCookieNL
|
  |
| Joined: 24 May 2009 |
| Total Posts: 1103 |
|
|
| 26 Mar 2012 05:45 AM |
| The difference is less lines. |
|
|
| Report Abuse |
|
|
|
| 26 Mar 2012 05:47 AM |
| and he is asking about connection lines not the difference between the two ;/ |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 26 Mar 2012 06:18 AM |
Anonymous function/connection:
[Instance][Event]:connect(function(par) -- end)
function/connection:
function onEvent(par) -- end
[Instance][Event]:connect(onEvent)
Only time that I wouldn't use an anonymous function (/connection) is when I have a function that I might call manually and that might call itself when an event fires. |
|
|
| Report Abuse |
|
|