So I made a menu that when you equip it a gui pops up and when you unequip it, it disappears. I found out that if you die, then respawn and try the menu it doesn’t work. Can you guys help me?
Here is my script:
local player = game.Players.LocalPlayer
local pgui = player:WaitForChild("PlayerGui")
local sgui = pgui:WaitForChild("Standard")
local frame = sgui:WaitForChild("ImageLabel")
local tool = script.Parent
tool.Equipped:Connect(function()
frame.Visible = true
end)
tool.Unequipped:Connect(function()
frame.Visible = false
end)
Thanks!