I maded a script but still it doesn’t work can someone help me please?
Here’s the script:
var BulletPrefab:Transform; var force
: float = 2000;function Update() {
if(Input.GetButtonDown(“Fire1”)) { var
bullet = Instantiate(BulletPrefab,GameObject.Find(“Barrel”).transform.position,
GameObject.Find(“Revolver”).transform.rotation);
bullet.rigidbody.AddForce(transform.forward
- force);
} }