problem with findobjectoftype

when I use FindObjectOfType, it only finds one object ,how can I find more objects with this code?

for example I have two objects ,they have a script name Stone.

   public class Stone : MonoBehaviour {
     public Animator anim;
   void Start(){
	anim = GetComponent<Animator> ();
}
  public void Destroying(){
   anim.play("DestoryStone");
  }

so if I use

  FindObjectOfType<Stone>().Destroying(); 

the animation will play in the first object .So how can I call Destroying() function in more than one object with FindObjectOfType<>().; ?

**//now it works fine :slight_smile:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class testFind : MonoBehaviour {
Stone[] s;
// Use this for initialization
void Start () {
	
	s=(Stone[]) GameObject.FindObjectsOfType(typeof(Stone));
	a ();
}


public void a(){

	foreach (Stone STONE in s) {

		STONE.anim.Play ("DestroyStone");
	}

}
 
}

Just use FindObjectsOfType instead of FindObjectOfType.

You’re going to need a loop or a lambda expression to call Destroying(); on each one though.