var thePrefab : GameObject;
var power : float = 5000.0;
function Update ()
{
if (Input.GetButtonDown ("Fire1"));
(Instantiate (GameObject, transform.position, transform.rotation));
rigidbody.AddForce(Vector3(0,0,power));
}
It says something like this...
Assets/Standard
Assets/Scripts/ShootBomb.js(7,22):
BCE0023: No appropriate version of
'UnityEngine.Object.Instantiate' for
the argument list '(System.Type,
UnityEngine.Vector3,
UnityEngine.Quaternion)' was found.
var thePrefab : GameObject;
var power : float = 5000.0;
function Update ()
{
if (Input.GetButtonDown ("Fire1"))
{
Instantiate (GameObject, transform.position, transform.rotation);
}
rigidbody.AddForce(Vector3(0,0,power));
}
Put that on a game object... The script wasn't right. Might work now.