generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: This makes no sence to me.No sence.

Previous Thread :: Next Thread 
Fedorakid is not online. 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 is not online. dop5k5
Joined: 18 Mar 2013
Total Posts: 42
12 Apr 2013 02:44 PM
they are function parameters >_>
Report Abuse
Fedorakid is not online. 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 is not online. Jake0148
Joined: 05 Jan 2013
Total Posts: 77
13 Apr 2013 05:12 PM
LOL! ^
Report Abuse
xSIXx is not online. 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 is not online. 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
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
13 Apr 2013 06:04 PM
http://www.roblox.com/Forum/ShowPost.aspx?PostID=62145553
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image