Load Library Fix?

I use this catalog from toolbox since i am no where near advanced enough and basically the catalog broke on the 3rd due to this new update and i’ve been search up on how to fix it and i have tried mulitple times but it doesn’t work

local nav=script.Parent:WaitForChild'Nav'
local menus=script.Parent:WaitForChild'Menus'
local create=assert(LoadLibrary("RbxUtility")).Create
local market=game:GetService'MarketplaceService'

function pop()
	local sound=LoadLibrary("Sound"){
			Name="Sound",
			SoundId="http://www.roblox.com/asset/?id=347564086",
			PlayOnRemove=true,
			Parent=workspace.CurrentCamera
		}
		sound:Destroy()
end

for a,d in pairs(nav:GetChildren()) do
	if menus:FindFirstChild(d.Name) then
		d.button.MouseButton1Down:connect(function()
			pop()
			if not menus[d.Name].Visible then
				for a,d in pairs(menus:GetChildren()) do
					d.Visible=false
				end
				--workspace.CurrentCamera.CameraType=Enum.CameraType.Scriptable
				menus['Quick'].Visible=true
				menus[d.Name].Visible=true
			else
				--workspace.CurrentCamera.CameraType=Enum.CameraType.Custom
				menus['Quick'].Visible=false
				menus[d.Name].Visible=false
			end
		end)
	elseif d.Name=="Take" then
		d.button.MouseButton1Down:connect(function()
			market:PromptPurchase(plr,485103207)
		end)
	elseif d.Name=="Donate" then
		d.button.MouseButton1Down:connect(function()
			market:PromptPurchase(plr,1230852500)
		end)
	end
end```

This is the script - The load library bit doesn't work.


I tried to add this

 local RbxUtility = require(game:GetService("ReplicatedStorage"):
    WaitForChild("LoadLibrary"):WaitForChild("RbxUtility"))

This is what i'm supposed to add but when i do it doesn't work.
1 Like

I would suggest looking into this thread LoadLibrary is going to be removed on February 3rd

Loadlibrary was removed.

Edit: this means you will most likely have to rescript the entire (or a large portion of) the script

1 Like

This article explains why you shouldn’t use RbxUtility.Create anyway:

Well then what should i use? I am hella confused. Idk how to fix this update they’ve done

You don’t even seem to be indexing the Create function in the code you provided.

local sound=RbxUtility.Create("Sound"){
			Name="Sound",
			SoundId="http://www.roblox.com/asset/?id=347564086",
			PlayOnRemove=true,
			Parent=workspace.CurrentCamera
		}

It’s got loads of scripts inside of it, it works already but the only thing that doesn’t work is the Loadlibrary bit. Stupid update has me now coughing up £40 for a script since i am not a pro at marketplace scripts

Since LoadLibrary is deprecated anyway it shouldn’t be used for new work.

Try replacing that line with this:

local sound = Instance.new("Sound")
sound.Name="Sound"
sound.SoundId="http://www.roblox.com/asset/?id=347564086"
sound.PlayOnRemove=true
sound.Parent=workspace.CurrentCamera
2 Likes
local plr=game.Players.LocalPlayer
local nav=script.Parent:WaitForChild'Nav'
local menus=script.Parent:WaitForChild'Menus'
local create=assert(LoadLibrary("RbxUtility")).Create
local market=game:GetService'MarketplaceService'

function pop()
	local sound = Instance.new("Sound")
sound.Name="Sound"
sound.SoundId="http://www.roblox.com/asset/?id=347564086"
sound.PlayOnRemove=true
sound.Parent=workspace.CurrentCamera
		sound:Destroy()
end

for a,d in pairs(nav:GetChildren()) do
	if menus:FindFirstChild(d.Name) then
		d.button.MouseButton1Down:connect(function()
			pop()
			if not menus[d.Name].Visible then
				for a,d in pairs(menus:GetChildren()) do
					d.Visible=false
				end
				--workspace.CurrentCamera.CameraType=Enum.CameraType.Scriptable
				menus['Quick'].Visible=true
				menus[d.Name].Visible=true
			else
				--workspace.CurrentCamera.CameraType=Enum.CameraType.Custom
				menus['Quick'].Visible=false
				menus[d.Name].Visible=false
			end
		end)
	elseif d.Name=="Take" then
		d.button.MouseButton1Down:connect(function()
			market:PromptPurchase(plr,485103207)
		end)
	elseif d.Name=="Donate" then
		d.button.MouseButton1Down:connect(function()
			market:PromptPurchase(plr,1230852500)
		end)
	end
end``` 

Added it but it didn't work

OMG OMG OMG!!! I GOT IT TO WORK! Thank you for your help btw! Honestly you’re the absolute best!

1 Like

I believe you can use This download link for the libraries
(as listed in LoadLibrary is going to be removed on February 3rd - Updates / Announcements - DevForum | Roblox)

Simply drag the file into roblox studio and move the folder to ReplicatedStorage

Then prepend this to your script:
local LoadLibrary = function(lib) return require(game:GetService("ReplicatedStorage"):WaitForChild("LoadLibrary"):WaitForChild(lib)) end

I see you tried to do the same

NOTE: Only use this for pre-existing scripts where they are too complicated to update and that use RbxGui or RbxStamper

1 Like

Hey there! I’m Link.

As @majdTRM said, you can get the LoadLibrary module from here.
But, I also made a custom LoadLibrary module, which supports your old code and you don’t even have to rewrite your whole code.

That said, you need to write the following in your code:

local nav=script.Parent:WaitForChild'Nav'
local menus=script.Parent:WaitForChild'Menus'
local LoadLibrary=require(7656342724)
local create=LoadLibrary("RbxUtility").Create
local market=game:GetService'MarketplaceService'

function pop()
	local sound=create("Sound") {
		Name="Sound",
		SoundId="http://www.roblox.com/asset/?id=347564086", -- use "https://www.roblox.com/library/347564086/pop4" if it's not loading
		PlayOnRemove=true,
		Parent=workspace.CurrentCamera
	}
	sound:Destroy()
end

for a,d in pairs(nav:GetChildren()) do
	if menus:FindFirstChild(d.Name) then
		d.button.MouseButton1Down:connect(function()
			pop()
			if not menus[d.Name].Visible then
				for a,d in pairs(menus:GetChildren()) do
					d.Visible=false
				end
				--workspace.CurrentCamera.CameraType=Enum.CameraType.Scriptable
				menus['Quick'].Visible=true
				menus[d.Name].Visible=true
			else
				--workspace.CurrentCamera.CameraType=Enum.CameraType.Custom
				menus['Quick'].Visible=false
				menus[d.Name].Visible=false
			end
		end)
	elseif d.Name=="Take" then
		d.button.MouseButton1Down:connect(function()
			market:PromptPurchase(plr,485103207)
		end)
	elseif d.Name=="Donate" then
		d.button.MouseButton1Down:connect(function()
			market:PromptPurchase(plr,1230852500)
		end)
	end
end

Aaand that’s all. Your code should work as if nothing happend.

1 Like