Javascript Events to capture a frame.

This should be fairly simple but without Javascript events its more difficult.

I have an object that is moving along x. When I click I want to capture the position.x the object is at on the frame when I clicked. I want to store this in a float. Simple right?
Thanks for your help,

Look up Input.GetMouseDown, or the OnMouseDown function, depending on what you’re doing.

–Eric

Yes! Thank you Eric. Learning the Javascripts… I used:

if(Input.GetMouseButtonDown(0))
{
clickOrigin = objectx;
}