modifying vector3 in transform.position

hi guys

Trying to instantiate cubes randomly using only specified X and Z axis.
Basically, user should be able to input min and max values for random float generator, as well as number of prefabs to be spawned.

However, i spent hours trying to cheat this one, no luck. It’s probably very simple, just that i can’t access transform values anyhow. For what i see the reason, probably is because transform stores 9 values in total (position, rotation, scale), i can’t seem to access position values, multiply them and instantiate prefabs accordingly from a spawn point, not Vector3.zero
and yes, i want to stick to rigidbody

var cubePrefab : Rigidbody;
var numberOfCubes : int;
var randomRangeMin : float;
var randomRangeMax : float;

function Start(){
		for (var i : int = 0; i < numberOfCubes; i++) {
		var randomRange = Random.Range (randomRangeMin, randomRangeMax);
		var pos = transform.position.Vector3 (randomRange, 0, randomRange);
 		Instantiate (cubePrefab, pos, Quaternion.identity);
		}
}

Thanks in advance.

I don’t get it.
transform.position will give you the world coordinates of the transform the script is attached to.
you can either add to the position

var pos = transform.position + Vector3 (randomRange, 0, randomRange);

or maybe scale

var pos = Vector3.Scale(transform.position,Vector3 (randomRange, 0, randomRange));

oh, lord, it always have to be something simple
to be honest i did not try addition, instead i tried multiplying and got an error.

This is what i came up with at the end. Might come in handy for someone else, Thanks ivkoni! (huge fan of Borat too!)

attach this to spawner, cubes will spawn at position of spawner. Can be used for AI or various props spawned on the run

spawn.js

var cubePrefab : Rigidbody;
var numberOfCubes : int;
var randomRangeMin : float;
var randomRangeMax : float;

function Start () {
    for (var i = 0; i < numberOfCubes; i++) { 
    	var randomRange = Random.Range (randomRangeMin, randomRangeMax);
        var angle = i * Mathf.PI * 2 / numberOfCubes;
        var pos = transform.position + Vector3 (Mathf.Cos(angle), 0, Mathf.Sin(angle)) * randomRange;
        Instantiate(cubePrefab, pos, Quaternion.identity);
    }
}