I have a function called dialog, attached to a Move hook, which looks for a input from the players mouse (it checks if the player has pressed mouse3) and if he did, it opens a dialog box. However, I keep getting errors like these “attempting to index global vgui (a nil value)”.
Why is this happening and how can I fix it?