I am trying to get game objects to spawn at a percentage and my script looks a little like this:
var triggerFunctionArray : float[];
//additional variables
//
//
//
//
//
function OnTriggerEnter(other : Collider){
}
if(Random.value <= chanceOfPlatformA)
{
Instantiate(chanceOfPlatformA);
}
function Start () {
}
function Update () {
}
for some odd reason I am getting this error : Assets/allTriggerFunctions/triggerFunctions.js(14,20): BCE0023: No appropriate version of ‘UnityEngine.Object.Instantiate’ for the argument list ‘(float)’ was found.
Any idea why?