LoadLibrary has been depreciated for some time...
Is there another way?
Ex.
local NEW = LoadLibrary('RbxUtility').Create
LoadLibrary has been depreciated for some time...
Is there another way?
Ex.
local NEW = LoadLibrary('RbxUtility').Create
1 minutes of google searching and it seems like that function returns an instance back to you. If i'm correct, to create a new instance we use Instance.New("Class")
Taking this example from the wiki about LoadLibrary
local RbxUtility = LoadLibrary("RbxUtility")
local Create = RbxUtility.Create
local redPart = Create "Part" {
Name = "Red Part";
Transparency = 0.5;
BrickColor = BrickColor.new("Bright red");
Position = Vector3.new(5, 5, 5);
Parent = workspace;
}
Instead of doing this we should do this
local redPart = Instance.new("Part")
redPart.Name = "Red Part"
redPart.Transparency = 0.5
redPart.BrickColor = BrickColor.new("Bright red")
redPart.Position = Vector3.new(5, 5, 5)
redPart.Parent = workspace
You shouldn't use the second argument of Instance.new to parent that instance immediately because it will take longing to replicate it.
Instance.new("Part",workspace) -- <-- bad
(That function must be really old o.o)
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
I'm asking the same question