Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
|
| 12 Apr 2013 02:38 PM |
This is a function script by digpoe and it doesent matter who wrote it or what function it is i just need to know how this works:
function tweenPart(part, start, end, smooth, delay) for i = 0, 1, smooth do part.Position = start:Lerp(end, i) wait(delay) end end
Example:
tweenPart(workspace.Part, Vector3.new(0, 0, 0), Vector3.new(0, 10, 0), 0.01, 0.1)
Not the tweening but the function itself.I need help understanding the variables inside the tweenpart variable.Why are there part,start,end,smooth, and delay when their not defined?? |
|
|
| Report Abuse |
|
|
dop5k5
|
  |
| Joined: 18 Mar 2013 |
| Total Posts: 42 |
|
|
| 12 Apr 2013 02:44 PM |
| they are function parameters >_> |
|
|
| Report Abuse |
|
|
Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
|
| 13 Apr 2013 04:54 PM |
| Okay but their undefined.I still dont get it mr.exploit leaker. |
|
|
| Report Abuse |
|
|
Jake0148
|
  |
| Joined: 05 Jan 2013 |
| Total Posts: 77 |
|
| |
|
xSIXx
|
  |
| Joined: 06 Aug 2010 |
| Total Posts: 9202 |
|
|
| 13 Apr 2013 05:36 PM |
local poop
oh wow, i just made an "undefined variable". ooooo, how scary.
it's not like doing the script above will do anything to the script, the script will be all like "lol, it's just a variable with no value, k i will leave it alone" and proceed.
and you can define the variable anytime in the script.
poop = "hi"
same with functions.
function lol(hi) print(hi) end
lol("test") -- that makes it so 'hi' is defined as "test". |
|
|
| Report Abuse |
|
|
xSIXx
|
  |
| Joined: 06 Aug 2010 |
| Total Posts: 9202 |
|
|
| 13 Apr 2013 05:37 PM |
| and obviously 'hi' will be local to the function only. |
|
|
| Report Abuse |
|
|
|
| 13 Apr 2013 06:04 PM |
| http://www.roblox.com/Forum/ShowPost.aspx?PostID=62145553 |
|
|
| Report Abuse |
|
|