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
 

Re: Is it possible to..

Previous Thread :: Next Thread 
LordWiII is not online. LordWiII
Joined: 19 Oct 2012
Total Posts: 411
02 Aug 2013 12:23 PM
Call a local function from another script that is the child of the script that has the local function.

example:

game.Workspace.Script.OtherScript

if I called a local function in "Script" in "OtherScript" would it work?

I'm a newbie scripter.
Report Abuse
wafles26122 is not online. wafles26122
Joined: 14 Jun 2010
Total Posts: 958
02 Aug 2013 12:24 PM
It would if you made it a global function, but no, local functions wont work in seperate scripts.

Report Abuse
LordWiII is not online. LordWiII
Joined: 19 Oct 2012
Total Posts: 411
02 Aug 2013 12:25 PM
So if I put "global" before the function I'm using would it work?
Report Abuse
wafles26122 is not online. wafles26122
Joined: 14 Jun 2010
Total Posts: 958
02 Aug 2013 12:27 PM
no....
http://wiki.roblox.com/index.php/Global_Functions

If that doesn't help you,

_G.AFunctionName = function()
print("testtest")
end

you can call _G.AFunctionName() in any other script
Report Abuse
LordWiII is not online. LordWiII
Joined: 19 Oct 2012
Total Posts: 411
02 Aug 2013 12:33 PM
Ok, global scripting sounds interesting. Thanks for the help.

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