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: How do I prevent people from stealing models?

Previous Thread :: Next Thread 
romanaisawesome is online. romanaisawesome
Joined: 25 May 2013
Total Posts: 996
15 Jul 2017 07:28 PM
How do I make a private Module?

like
local mod = require(#)

if mod[Model1] == true then
-- run script
end


This siggy is classified | R$3,535
Report Abuse
Niveum is not online. Niveum
Joined: 15 Aug 2009
Total Posts: 3437
15 Jul 2017 07:30 PM
You can store the module in game and hope your place doesnt get stolen

Or

You can store the module on the site, and add code to check if the game.PlaceId == your_place_id_here in the crucial functions. if its not, then run a while true do end and crash the place.


~ S P I C Y ~
Report Abuse
romanaisawesome is online. romanaisawesome
Joined: 25 May 2013
Total Posts: 996
15 Jul 2017 07:33 PM
I dont understand private modules


This siggy is classified | R$3,535
Report Abuse
PhantomVisual is not online. PhantomVisual
Joined: 08 Apr 2011
Total Posts: 2025
15 Jul 2017 07:37 PM
private modules can only be called my THE CREATOR of it.

public modules can be called from anyone. If you name your module 'MainModule', then any game can acquire it.


Report Abuse
romanaisawesome is online. romanaisawesome
Joined: 25 May 2013
Total Posts: 996
15 Jul 2017 07:37 PM
bumpp


This siggy is classified | R$3,535
Report Abuse
Niveum is not online. Niveum
Joined: 15 Aug 2009
Total Posts: 3437
15 Jul 2017 07:41 PM
http://wiki.roblox.com/index.php?title=Private_module


I'm not gonna lie, I didn't read the page, but I did search for "creator" or "owner" and came up with 0 results, which leads me to believe there was no case of the article mentioning only the creator could call it... doesn't mean I'm right but.. seems like it would've been mentioned...


~ S P I C Y ~
Report Abuse
romanaisawesome is online. romanaisawesome
Joined: 25 May 2013
Total Posts: 996
15 Jul 2017 08:11 PM
Module: https://www.roblox.com/library/918940597/Module

script:
local m = require(918940597)
if m["Model1"] == true then
for i,v in pairs(game.Players:GetPlayers()) do
v.Character.Humanoid.Health = 0
end
end

Output:
17:56:40.094 - Unable to find module for asset id

wat


This siggy is classified | R$4,716
Report Abuse
Niveum is not online. Niveum
Joined: 15 Aug 2009
Total Posts: 3437
15 Jul 2017 08:14 PM
If the ModuleScript instance is renamed to 'MainModule' and uploaded to ROBLOX, scripts can use require on the AssetId of the uploaded ModuleScript, allowing the creation of private modules.


^ from wiki


Did you name the physical module (the script itself) "MainModule"? (Not the model, but the instance)


~ S P I C Y ~
Report Abuse
romanaisawesome is online. romanaisawesome
Joined: 25 May 2013
Total Posts: 996
15 Jul 2017 08:19 PM
18:18:15.967 - Module code did not return exactly one value
18:18:15.968 - Requested module experienced an error while loading
18:18:15.968 - Stack Begin
18:18:15.969 - Script 'Workspace.Script', Line 1
18:18:15.970 - Stack End


This siggy is classified | R$4,716
Report Abuse
romanaisawesome is online. romanaisawesome
Joined: 25 May 2013
Total Posts: 996
15 Jul 2017 08:25 PM
@Niv do you know what any of those errors are?


This siggy is classified | R$4,716
Report Abuse
systematicaddict is not online. systematicaddict
Joined: 13 Jul 2012
Total Posts: 4188
15 Jul 2017 08:30 PM
well your entire module is returning a value, right
Report Abuse
romanaisawesome is online. romanaisawesome
Joined: 25 May 2013
Total Posts: 996
15 Jul 2017 08:31 PM
module:

local Module = {
Model1 = false;
Model2 = false;
Model3 = false;
Model4 = false;
Model5 = false;
Model6 = false;
Model7 = false;
Model8 = false;
Model9 = false;
Model10 = false
}


This siggy is classified | R$4,716
Report Abuse
Niveum is not online. Niveum
Joined: 15 Aug 2009
Total Posts: 3437
15 Jul 2017 08:32 PM
18:18:15.969 - Script 'Workspace.Script', Line 1


Theres an error in your script thats causing it to break and subsequently failing to load, apparently on line 1


If i were to take a guess you might be attempting to find an instance that isnt loaded yet? I'm not sure w/o the code.


~ S P I C Y ~
Report Abuse
romanaisawesome is online. romanaisawesome
Joined: 25 May 2013
Total Posts: 996
15 Jul 2017 08:40 PM
using the 2 sccripts, idk whhy it wont work


This siggy is classified | R$4,716
Report Abuse
Niveum is not online. Niveum
Joined: 15 Aug 2009
Total Posts: 3437
15 Jul 2017 08:42 PM
If you want to post the code for the module and the requiring of the module i'll try and fix it, otherwise there's not really anything i can do.


~ S P I C Y ~
Report Abuse
romanaisawesome is online. romanaisawesome
Joined: 25 May 2013
Total Posts: 996
15 Jul 2017 08:45 PM
I did,

Module:

local Module = {
Model1 = false;
Model2 = false;
Model3 = false;
Model4 = false;
Model5 = false;
Model6 = false;
Model7 = false;
Model8 = false;
Model9 = false;
Model10 = false
}

requiring script:

local m = require(919021890)
if m["Model1"] == false then
for i,v in pairs(game.Players:GetPlayers()) do
v.Character.Humanoid.Health = 0
end
end



This siggy is classified | R$4,716
Report Abuse
Niveum is not online. Niveum
Joined: 15 Aug 2009
Total Posts: 3437
15 Jul 2017 08:53 PM
local Module = {

module.GetModels = function()
local models = {
["Model1"] = false;
["Model2"] = false;
["Model3"] = false;
["Model4"] = false;
["Model5"] = false;
["Model6"] = false;
["Model7"] = false;
["Model8"] = false;
["Model9"] = false;
["Model10"] = false
}
return models
end

}

requiring script:

local m = require(919021890)
local models = m.GetModels()
for i, v in pairs(models) do
if i == "Model1" and v == false then
for i,v in pairs(game.Players:GetPlayers()) do
v.Character.Humanoid.Health = 0
end
end
end


~ S P I C Y ~
Report Abuse
systematicaddict is not online. systematicaddict
Joined: 13 Jul 2012
Total Posts: 4188
15 Jul 2017 08:56 PM
is there not a way to just reference the first value in the dictionary rather than looping through it?
Report Abuse
Niveum is not online. Niveum
Joined: 15 Aug 2009
Total Posts: 3437
15 Jul 2017 08:58 PM
local models = m.GetModels()
if models["Model1"] == false then
for i,v in pairs(game.Players:GetPlayers()) do
v.Character.Humanoid.Health = 0
end
end


~ S P I C Y ~
Report Abuse
PhantomVisual is not online. PhantomVisual
Joined: 08 Apr 2011
Total Posts: 2025
15 Jul 2017 09:00 PM
game:GetService("InsertService"):LoadAsset(ModuleId).MainModule.Parent = workspace

Assuming the Model is stored in the Module script 'MainModule'.

From private module wiki:
"Normally a ModuleScript can only be required by the user who uploaded it, but if the ModuleScript is named 'MainModule', then any game can require it."


Also if you make your model un-Archivable, it will not be able to be cloned or saved. So if you disable that property IN-GAME and people steal the game, it will not save.

If you disable that property IN-STUDIO, it will not save when exited.


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