I need help with this script.

I would like it to rotate the gameObject with the tag TGuide when the gameObject is left clicked, but instead of the gameObject rotating, the player does. Please help.

The player rotates because I assume this script is on the player. This line:

transform.Rotate(x, y, z);

Is applied to the transform of the GameObject where this script is located (ie, the player). To do this for your target object, you need the target object’s transform instead. So change that line to:

vision.collider.transform.Rotate(x, y, z);

And it should work as expected. Good luck!

Thank you.