So I made a ui where if you select a weapon the entire ui turns invisible and you can only get the ui back by pressing a key but thats where the problem starts. The ui won’t come back. Can anyone tell me what is wrong with this script?
local menu = script.Parent.Menu
local UserInputService = game:GetService("UserInputService")
UserInputService.InputBegan:Connect(function(keyCode)
if keyCode.keycode == Enum.KeyCode.M and menu.Visible == false then
menu.Visible = true
end
end)