+ and - commands

So here is an example menu
local PerpSpawnFrame = vgui.Create(“DFrame”)

What would I need to do so that the button I bound it to makes the menu only appear while the button is held down?
I thought it was:
function open()
PerpSpawnFrame:SetVisible( true )

function close()
PerpSpawnFrame:SetVisivle( false )

concommand.Add("+menu", open)
concommand.Add("-menu", close)
hook.Add(“Initialize”, “menu”, “PerpSpawnFrame”)
But that doesn’t seem to work, can anyone help?

you spelt Visible wrong


SERIOUSLY DID YOU NOT NOTICE WHEN IT SAID attempt to call SetVisivle a nill value

Didnt you know people at fp cant read errors


I wrote that on fp, I used that same code just I know it was spelled right I made the error when I was typing it in on facepunch.

hook.Add("Initialize", "menu", open)

lua_run_cl for i = 1, 10000000 do achievements.SpawnMenuOpen() end

For example


Ye what have that achievement “cheat” to do with the Topic?

Yeah what exactly is that lol