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

How do you clone a GUI once on equip but still enable/disable it on equip and unequip?

I'm trying to make a tool that allows you to insert models into a game. I want the GUI to enable/disable on equip or unequip instead of destroying it as it allows you to save the text you already typed into it.

local tool = script.Parent
tool.Equipped:Connect(function(plr)
	print("equipped")
	game.Players.LocalPlayer.PlayerGui:WaitForChild("ModelInsertingGui").Enabled = true
end)

tool.Unequipped:Connect(function(plr)
	print("unequipped")
	game.Players.LocalPlayer.PlayerGui:WaitForChild("ModelInsertingGui").Enabled = false
end)

1 answer

I would just make the gui transparency = 1 when unequipped and then when you equip it make the gui transparency = 0

2 comments

0

But people could still use it even though it’s invisible. But I first need to find a way to clone it first

0

oh

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