|
| 03 Sep 2017 12:02 AM |
I was wondering if this code would be enough to prevent other users from gaining access and/or using a private module uploaded to the site:
if (game.CreatorId ~= SOMEUSERID) then for _,c in pairs (script:GetChildren()) do c:Destroy() end script = nil print("Unauthorized use detected.") return {} end
If there is an easier way to prevent someone else from using a private module and I'm just being dumb please let me know.
|
|
|
| Report Abuse |
|
|
|
| 03 Sep 2017 12:04 AM |
| Anything stored on the client can be found. So no, if that is a module sent to the client it won't work. |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 03 Sep 2017 12:05 AM |
if (game.CreatorId ~= SOMEUSERID) then return nil end |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 03 Sep 2017 12:06 AM |
"Anything stored on the client can be found. "
Keywords used here are "private module".
Can only be used by the server. |
|
|
| Report Abuse |
|
|
|
| 03 Sep 2017 12:11 AM |
Oh, good of the wiki to mention that they can only be used from the server. Here I am using one on the client...
-_-
|
|
|
| Report Abuse |
|
|
Duusskk
|
  |
| Joined: 27 Aug 2013 |
| Total Posts: 651 |
|
|
| 03 Sep 2017 12:12 AM |
"Oh, good of the wiki to mention that they can only be used from the server."
Well, how else can they prevent theft of private modules? |
|
|
| Report Abuse |
|
|
|
| 03 Sep 2017 12:14 AM |
You seem to have misunderstood my comment.
I was referring to the fact that nowhere does the wiki say that private modules can only be accessed from the server.
|
|
|
| Report Abuse |
|
|
Duusskk
|
  |
| Joined: 27 Aug 2013 |
| Total Posts: 651 |
|
|
| 03 Sep 2017 12:15 AM |
Okay, well, here we go.
Firstly, I thought it was pretty obvious, with or without a statement.
Secondly, please see: http://wiki.roblox.com/index.php?title=Private_module
"Private modules cannot be loaded from studio. This makes it difficult to test games which rely on private modules." |
|
|
| Report Abuse |
|
|
|
| 03 Sep 2017 12:19 AM |
I've read the page on private modules, and again it says nowhere that they cannot be accessed from the client.
"Private modules cannot be loaded from studio. This makes it difficult to test games which rely on private modules."
Is also false unless it is referring to other users (which it seems to be) because I had no trouble loading one of my own from studio.
Again, nowhere does it say something along the lines of "private modules can only be accessed from the server" or anything that could be interpreted as being along those lines.
|
|
|
| Report Abuse |
|
|
Duusskk
|
  |
| Joined: 27 Aug 2013 |
| Total Posts: 651 |
|
|
| 03 Sep 2017 12:22 AM |
It's just simply the same concept. Client and studio are both able to see the source of a private module.
Unfortunately the wiki is not community-written anymore so you're not going to see this clarified anytime soon. |
|
|
| Report Abuse |
|
|
|
| 03 Sep 2017 12:25 AM |
"It's just simply the same concept. Client and studio are both able to see the source of a private module."
Not sure what this has to do with anything, but I'm going to stop bumping this thread now. I would suggest you do the same as other people have threads that require attention. This one does not.
|
|
|
| Report Abuse |
|
|
amanda
|
  |
| Joined: 21 Nov 2006 |
| Total Posts: 5925 |
|
| |
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 03 Sep 2017 01:26 AM |
"nowhere does the wiki say that private modules can only be accessed from the server."
It does. You are just looking at the wrong thing.
http://wiki.roblox.com/index.php?title=Global_namespace/Roblox_namespace#require
"If the ModuleScript the user wants to use has been uploaded to ROBLOX (with the instance's name being 'MainModule'), it can be loaded by using the require function on the asset ID of the ModuleScript, though only on the server." |
|
|
| Report Abuse |
|
|
|
| 03 Sep 2017 01:32 AM |
"Unfortunately the wiki is not community-written anymore so you're not going to see this clarified anytime soon."
"Joined: 27 Aug 2013"
Sorry bud, you weren't around when editing was open to the community.
|
|
|
| Report Abuse |
|
|
Duusskk
|
  |
| Joined: 27 Aug 2013 |
| Total Posts: 651 |
|
|
| 03 Sep 2017 01:44 AM |
| ask rbx_dev if that's a true statement |
|
|
| Report Abuse |
|
|
Duusskk
|
  |
| Joined: 27 Aug 2013 |
| Total Posts: 651 |
|
|
| 03 Sep 2017 01:45 AM |
| rbx_lua/emporerj/whatever he goes by these days* |
|
|
| Report Abuse |
|
|