How do I make a tool which clones the GUI when it's equipped and when it's unequipped, it destroys? I have no idea...
✓ ANSWER ACCEPTED
Tools with GUIs?
1 answer
✓ Accepted answer
http://wiki.roblox.com/index.php?title=Tool
Please check the wiki before coming here.
local tool = script.Parent -- assuming script is in tool
local gui = game.ReplicatedStorage.Gui -- example gui
tool.Equipped:connect(function(mouse)
local guiclone = gui:Clone()
guiclone.Parent = player.PlayerGui-- assuming you already have "player" defined
end)
tool.Unequipped:connect(function()
if player.PlayerGui:findFirstChild("Gui") then
player.PlayerGui:findFirstChild("Gui"):Destroy() -- removes "Gui"
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Sorry, I was looking in the wrong part of the wiki. I was looking at .Equipped and .Unequipped and I couldn't see where I was going wrong, thanks.