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

How to hide the backpack or deactive the equip and unnequip tools functions?

I have functions that acctualy move some tools, the script of move the tools works good, the problem is when the player equip or unnequip tools, while the function to move the tools is working, beacause when a tool is equip or unequip, the parent change, and, when the parent change, I can't validate the status of the tool, because I acctualy use the parent to iterate the tools, and move they to the corresponding parent.

So I need to turn off, block, disable or something like that, the player backpack, or at least, the Humanoid function that equip and unnequip the tools, just to prevent the change of parent's tools while the transition of the tools is working.

Any help will be appreciated.

1 answer

✓ Accepted answer

Ok this will disable the backpack.

step one insert a script into workspace. in that script paste this.

script.Parent = game.ServerScriptService

game.Players.PlayerAdded:connect(function(plr)
	local dis = script:FindFirstChild("Disable"):Clone()
	if dis then
		local plrGui = plr:WaitForChild("PlayerGui")
		dis.Parent = plrGui
		dis.Disabled = false
	end
end)

then inside that script insert a local script. inside the localscript paste this.

game.StarterGui:SetCoreGuiEnabled(2, false)

2 comments

0

and, how to enable?

1

game.StarterGui:SetCoreGuiEnabled(2, true)

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