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
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

local Function Help D:

Previous Thread :: Next Thread 
YodaimeKing is not online. YodaimeKing
Joined: 01 Nov 2009
Total Posts: 3961
28 Nov 2011 02:10 PM

(For learning)

a,b,c,d = 1,2,3,4
if true then
local a,b,c,d = a,b,c,d
print(a,b,c,d)
end
print(a,b,c,d)

Output> 1234
1234

Does this mean that you can assign local variables while using a local function?
Report Abuse
yoyoman2 is not online. yoyoman2
Joined: 07 Mar 2009
Total Posts: 2170
28 Nov 2011 02:14 PM
affcours:
local function s()
local a = 5
end
Report Abuse
YodaimeKing is not online. YodaimeKing
Joined: 01 Nov 2009
Total Posts: 3961
28 Nov 2011 02:19 PM
Nope :3

a,b,c,d = 1,2,3,4
if true then
local a,b,c,d = 2,3,4,5
print (a,b,c,d)
end
print(a,b,c,d)


Output: 2345
1234
Report Abuse
YodaimeKing is not online. YodaimeKing
Joined: 01 Nov 2009
Total Posts: 3961
28 Nov 2011 02:22 PM
Oh my! I just realized, You could make certain functions with the same variables and just run them after instead of having to use a million different variables


:D
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