How would I go about making a 'lock on' system?

This worked! Thanks for the help!