I am trying to replace loadlibrary as the use of it is no longer being used. Can someone advise me as of how to replace it? Here is the script I have to change.
local create = assert(LoadLibrary("RbxUtility")).Create
Is it as simple as Instance.New or? Would appreciate the help.
Yes, it is as simple as Instance.new().
In fact, create would be as simple as this:
local part = Instance.new("Part") part.Name = "NewPart" part.BrickColor = BrickColor.new("Really red") part.Parent = workspace
On the developer forum, Roblox provided a solution to LoadLibrary
being removed:
1. Go here.
2. Scroll down and click on the file called LoadLibrary.rbxmx
3. Save it
4. Insert it into your game. You should see a folder with 3 ModuleScript
s.
5. Delete the ModuleScript
s you don't need, only keeping the RbxUtility
ModuleScript
, as that is the only one you need.
6. You're done! Use require()
to access the contents of the ModuleScript
and call the Create
function.