Onmouseover not working

When i hold my cursor over my “pongBall” i want it to print picked up.
The script is attached to my camera. Why doesn’t it work?

#pragma strict

function Start () {


function Update () {


function OnMouseOver () {
if(gameObject.tag == "pongBall")  {
print("Picked up"); 


I’m not an expert with mouse over coding but I think you need to

  1. put this script on the ball instead of the camera

  2. give the ball a box collider with a trigger