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 » Scripters
Home Search
 

Re: meaning of local script and module script

Previous Thread :: Next Thread 
Marsalan2310 is not online. Marsalan2310
Joined: 07 Sep 2016
Total Posts: 51
30 Nov 2016 07:11 PM
please tell me asap
Report Abuse
Ryuzoji is not online. Ryuzoji
Joined: 21 Dec 2015
Total Posts: 937
30 Nov 2016 07:12 PM
LocalScript you use in a client.

ModuleScript is basically like the old global functions, but more efficient.
Report Abuse
Marsalan2310 is not online. Marsalan2310
Joined: 07 Sep 2016
Total Posts: 51
30 Nov 2016 07:13 PM
??
Report Abuse
Ryuzoji is not online. Ryuzoji
Joined: 21 Dec 2015
Total Posts: 937
30 Nov 2016 07:17 PM
Example (Non-FE version)

-- Workspace (ModuleScript)
local Module = {} -- Ignore

function Module:PrintMessage(Content)
print(Content)
end

return Module -- Ignore

-- Client (LocalScript)
local Module = require(game.Workspace.ModuleScript)

Module:PrintMessage("Hello, World!")


--

Script vs LocalScript in a nutshell
Script - Use on server
LocalScript - Use on client
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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