Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do i replace LoadLibrary?

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.

3 comments

0

Yes it is that simple. When are you from? LoadLibrary was deprecated years ago.

0

LoadLibrary was removed Dec. 4, 2019

0

All you have to do is remove that line of code from your script. Sometimes it dosn't work but majority of the time it will.

2 answers

✓ Accepted answer

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

For more info on Instance.new() click here.

1 comment

0

(actually mine is an intro and i dont even know how to do it)

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 ModuleScripts.
  5. Delete the ModuleScripts 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.

This discussion is preserved as it was. New answers, comments, and votes are closed.