Why when i equip the tool the gui is not visible?
Asked by
4 years ago Edited 4 years ago
when i equip the tool, the gui is not opening
01 | local tool = script.Parent |
03 | local menu = tool.Menu |
04 | local setaribg = menu.SetariBackground |
05 | local csetaribg = setaribg:Clone() |
06 | csetaribg.Parent = game.Players.LocalPlayer.PlayerGui |
07 | if csetaribg.Visible = = false then |
08 | csetaribg.Visible = true |
14 | local csetaribg = game.Player.LocalPlayer:WaitForChild( "Menu" ) |
15 | if csetaribg.Visible = = true then |
16 | csetaribg.Visible = false |
21 | tool.Equipped:Connect(echipat) |
22 | 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