You need to add this to the very beginning of
all your OnClick scripts:
Code:
if pressed then
return
end
What kgPanels labels "OnClick" actually gets run for
both OnMouseDown and OnMouseUp, with a special variable passed to tell your script which event it's running for. If you want it to work like a real OnClick script, you need to ignore the OnMouseDown event, and only respond to the OnMouseUp event, by checking the "pressed" variable. Otherwise, your "OnClick" script gets run
twice every time you click -- once when you press the mouse button, and again when you release it.