Button on entity

Hello i’m working on some upgrades for my printers i made 2x RoundedBox and what i’m trying to do is make them accept a input so like then you click E on the roundedbox it run a function.

What about good old mouse? (Anyway you can’t do anything like that with painted shapes)

I know there is some way to get this working i saw it on a other server and i’m coding this for a friend and he want it this way.

Okay so.

Use the PANEL:Think() hook to check if the E key is down with input.IsKeyDown and also check if the mouse is inside the coordinates of the rounded rectangle

You mean a 3D2D button

look here: