I do not know if this is intentional, but creating ModuleScript
using Instance.new
, creates no value. Here’s a screenshot of what I mean:
Wouldn’t it be better just to clone a module script?
That’s not how ModuleScripts are intended to be used. A ModuleScript should end with a return statement that returns a single value, usually a table, sometimes a function. Then you make that value available to other scripts using require.
All explained here ModuleScript | Roblox Creator Documentation
I literally said creating a ModuleScript
with Instance.new
is causing issues, why else do you think I said that??
It would be… and I’m doing it right now, but having it work with Instance.new
would be better.
Try doing
Instance.new("ModuleScript",game.ServerScriptService).Source = [[
local module = {}
return module
]]
A script’s source can’t be edited while in-game. Those permissions are only granted to plugins.
I mean, I don’t see use of it then, why are you doing this?
I can’t tell you everything, but let’s just say I’m trying some anti-cheat…
Okay, whatever this “anti cheat” does , I’m pretty sure it’s inefficient and bypassable.
I’m not gonna argue with you because you don’t even know what it does or how it works
Are you trying to make a bunch of duplicates to confuse exploiters or something?
I still see no use of it, my brain is hurting when you said “anti-cheat”.
That’s child’s play to defeat… think something better
Well you’ve got me stumped then.
No problem, I am not asking you to use it
Did you guys forget my question? I asked, Is this intentional or not?
, not How do I fix this?
. Please stick to the topic…
Yes this is intentional. New scripts are generated blank except when inserting them via Studio.
I’m pretty sure it’s intentional as I just tested it now and it does the same thing.