when i equip the tool, the gui is not opening
local tool = script.Parent function echipat() local menu = tool.Menu local setaribg = menu.SetariBackground local csetaribg = setaribg:Clone() csetaribg.Parent = game.Players.LocalPlayer.PlayerGui if csetaribg.Visible == false then csetaribg.Visible = true print("open") end end function dezechipat() local csetaribg = game.Player.LocalPlayer:WaitForChild("Menu") if csetaribg.Visible == true then csetaribg.Visible = false end print("close") end tool.Equipped:Connect(echipat) tool.Unequipped:Connect(dezechipat)
also, the print is not showing in the console. i'm missing something?
i want the gui to open when i equip the tool and close when i unequip the tool edit: changed the code, same problem