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

Re: Loading a ModuleScript from AssetID on the client?

Previous Thread :: Next Thread 
NotAshley is not online. NotAshley
Joined: 16 Jan 2014
Total Posts: 14257
16 Apr 2015 06:00 PM
I thought it would be as simple as getting it from the server then passing it to the client via a RemoteFunction, but it won't work.
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
16 Apr 2015 06:16 PM
Can't you require them locally, even from an asset?
Report Abuse
NotAshley is not online. NotAshley
Joined: 16 Jan 2014
Total Posts: 14257
16 Apr 2015 06:18 PM
I'm pretty sure you can't. Didn't work when I tried.

I've been trying hacky workarounds for hours.
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
16 Apr 2015 06:20 PM
Well, I don't think you can then. Nothing comes to my mind that would help you, hacky or otherwise.
Report Abuse
NotAshley is not online. NotAshley
Joined: 16 Jan 2014
Total Posts: 14257
16 Apr 2015 06:21 PM
I simply don't understand how it's not accepting it as an argument passed through remote events or functions.
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
16 Apr 2015 06:23 PM
The clients and the server are all different machines. Only certain data is passed through the RemoteEvents/Functions.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
16 Apr 2015 06:25 PM
You can't require by ID from a local script O_o?
I thought you could (although I never actually tested it). Does it error or return nil or something?
Report Abuse
NotAshley is not online. NotAshley
Joined: 16 Jan 2014
Total Posts: 14257
16 Apr 2015 06:26 PM
It gives some specific error about it not being able to get ModuleScripts AssetIDs from the client.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
16 Apr 2015 06:27 PM
Meh, probably for security reasons (which would make sense).
Well you can always upload the modulescript to your account and use InsertService then when it is in-game, require it (ofc. destroy if after that)?
Report Abuse
NotAshley is not online. NotAshley
Joined: 16 Jan 2014
Total Posts: 14257
16 Apr 2015 06:28 PM
I'm trying to make a public library without people being able to modify the source code. I can't get it to work on clients.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
16 Apr 2015 06:31 PM
Oh. This is one of those times where bytecode would be useful so you can just make the thing uncopylocked and the source-code itself will be pretty hard to edit.
Report Abuse
Casualist is not online. Casualist
Joined: 26 Jun 2014
Total Posts: 4443
16 Apr 2015 06:31 PM
It kind of defeats the purpose of protecting your code if you allowed clients to load it, hence roblox only allows server scripts to require modules by id if the asset is copylocked.
Report Abuse
NotAshley is not online. NotAshley
Joined: 16 Jan 2014
Total Posts: 14257
16 Apr 2015 06:32 PM
I could do that if the VM worked. We just need to fix up the events.
Report Abuse
NotAshley is not online. NotAshley
Joined: 16 Jan 2014
Total Posts: 14257
16 Apr 2015 06:33 PM
@Casualist I just think it'd be cool to have a module that auto-registers itself to the server and all the clients, so you could have a code library that can be shared with just a line or two.
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