- Home /
 
 
               Question by 
               satine313 · Oct 11, 2016 at 05:22 AM · 
                javascriptscripting problemscriptingbasicsjava  
              
 
              Java Script error Q's MissingReferenceExeption BCE0034 and BCE005
@taxvi I'm trying to make a gun fire a projectile with a java script i found in a video, link https://www.youtube.com/watch?v=NPlRbxJtKxE, this is the script I'm using
var projectile; Rigidbody;
var speed = 10;
function Update() {
 if (Input.GetButtonUp ("Fire1"))
 {
     clone = Instantiate(projectile, transform.position, transform.rotation);
     clone.velocity = transform.TransformDirector(Vector3(0, 0, speed));
     if (object != null) {
         Destroy(clone.gameObject, 5);
     }
 
               }}
               Comment
              
 
               
              Your answer
 
             Follow this Question
Related Questions
Its not playing the Audio? 2 Answers
OnTriggerEnter called only one time?!! 5 Answers
How could I center a GUI box on screen? 3 Answers
Wrong GameObject activates 2 Answers
How would i make it transform player.position =target.position? 2 Answers