maybe you can use on a client:

function mouse_check(){
while(1){
wait(1);
if(mouse_left && mouse_ent){
ent_you = mouse_ent;
}
}
}

it just checks if you press left mouse button and if a mouse entity is active and than sets the ent_you to mouse_ent