script.Parent.InputBegan:Connect(function(input) -- assuming image property active is set to true and script placed inside ImageLabel
if input.UserInputType == Enum.UserInputType.MouseButton1 then -- detects if pressed button is Left Mouse Button
-- do that you want here
end
end)
script type is local because i wanna detect for player which is running this script for.
I hope this guide you found useful or helpful.
Youāre guess is as good as mine, there would be no need for this script for an ImageButton either, as ImageButtons support straight up connecting to MouseButton1Click events- rather than getting InputBegan then checking what input it was.
You can kind of get that icon fixed as well. Just set the āActiveā property of the button to false and it removes the icon while hovering but it does still make it appear when you click it.
Not really a reason for this since you can just use image buttons, but this method can be used on frames and canvas groups too (atleast as long as the āactiveā property is on i think.)