playing the animation from a different game object

i want to play an animation from a different game object, for example, a sphere has a script that will play an animation when activated, but the animation is an another game object. how can i do this, im new to scripting so if anyone can show me how that would be great.

i think i need to add s another script to the sphere something like find a game object with the tag camera and play animation (“100”)

look at GameObject.Find or FindWithTag. it searches the scene for the gameobject and then you can reach it’s animations.
ex. GameObject.FindWithTag(“Spere”).animation.play(“animationname”);
should be something like that.

yes yes ty