Random instantiation at an object

Hello,

As the title suggests, I’m trying to instantiate an object around a particular object (tree) and within a random range around the area have them spawn. As I don’t want to object to appear at the same point every time.

I looked on the unity scripting reference at “Random” but not sure if I need to do something else to implement this properly.

function TreeHit (treeHit : int)
{
	treeHealth -= treeHit;
	
	if(treeHealth <= 25)
	{
		var position : Vector3 = Vector3(Random.Range(-10.0, 10.0), 0, Random.Range(-10.0, 10.0));
		Instantiate(apple, tree.transform.position, Quaternion.identity);
		treeHealth = 100;
	}
}

function TreeHit (treeHit : int){ treeHealth -= treeHit;  if(treeHealth <= 25) { var position : Vector3 = Vector3(Random.Range(-10.0, 10.0), 0, Random.Range(-10.0, 10.0)); Instantiate(apple, tree.transform.position+positiom, Quaternion.identity); treeHealth = 100; }}