I am trying to make a game in witch you shoot cubes from 1st person view and i'm using this script
var speed = 3.0;
var CratePrefab:Transform;
function Update ()
{
if(Input.GetButtonDown("Fire 1"))
{
var Crate = Instantiate( CratePrefab, transform.position, Quaternion.identity);
Crate.rigidbody.AddForce(transform , forward * 2000);
}
}
Then i get this error:
Assets/Shoot.js(11,54): BCE0005: Unknown identifier: 'forward'.