How do I make a tool (supposedly a weapon) that allows a gui to appear and disappear on equip? I want my gui to appear on equip and disappear on de-equip. This would be made to be equipped multiple times without deleting the gui. GUI would be named "GunGUI"
✓ ANSWER ACCEPTED
How do I make a tool (supposedly a weapon) that allows a gui to appear and disappear on equip?
1 answer
✓ Accepted answer
the word GUI must be defined and it must be a frame, if it is a ScreenGui, change Gui.Visible to Gui.Enabled
local tool = script.Parent
local GUI -- put an = sign and change it to the GUI
if tool.Equipped = true then -- may not work / may work, change it to == if it doesn't work
GUI.Visible = true
elseif tool.Equipped = false then -- may not work / may work, change it to == if it doesn't work
GUI.Visible = false
end
I forgot if i need to make the if statements an == instead of an = Thx, accept answer if works
Edit 1: The local GUI must be defined in order to work.. The local GUI is the gui that you want to make visible / invisible
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
I don't understand the "local GUI -- put an = sign and change it to the GUI"
Basically you are assigning the variable GUI to the GUI of yours.
You would have thought a person with 223 rep would know how do edit their answers by now.
actually I do know ^