How do you do clientside lua? I think im doing it wrong.

What is the proper way of doing this? Because i feel like i am doing it in the most assbackwards way possible.

>init.lua in entity preforms a console command
>that console command is linked with clientside stuff

that… just doesn’t feel right

What would the the proper way for an entity to spawn a vgui element when i use ent:use

thank you so much