Originally Posted by Ferous
How would I go about adding a script to a panel and having an onclick so i can click it ingame for it to do something
|
Use the OnClick attribute:
Code:
OnClick = function(self, button)
if button == "LeftButton" then
-- do something
elseif button == "RightButton" then
-- do something else
end
end
You can also check for modifiers with IsShiftKeyDown() or IsAltKeyDown().