SpawnIcon's click function doesn't work

[lua]local dbut = vgui.Create(“SpawnIcon”, Window)
dbut:SetSize(64, 64)
dbut:SetPos(300, 300)
dbut:SetModel(“models/error.mdl”)
dbut:SetKeyboardInputEnabled(false)
dbut:SetMouseInputEnabled(false)
dbut.OnMousePressed = function()
print(math.Round((chance / totalchances) * 1000))
LocalPlayer():ConCommand("zs_buy_gun “…math.Round((chance / totalchances) * 1000)…” "…name)
end[/lua]
Why won’t this work?

dbut:SetMouseInputEnabled(false)

I think it’s that, try changing it to true.

dbut.DoClick = function()