- Home /
 
               Question by 
               Discocreeper101 · Nov 13, 2013 at 01:21 AM · 
                errordelete  
              
 
              Something Wrong With My Script
My Problem Is That When I Try To Add This Script http://www.mediafire.com/?e2t7cwycvbppd1s To This Pickaxe http://www.mediafire.com/?z6cku34kn8vd4ae It Does Not Destory. Project http://www.mediafire.com/?sfddv9a2tlyv9jf P--/SSVVORD: 121334 \/
Code:
 var PickAxe : GameObject;
 var range : float = Mathf.Infinity;
 var hit : RaycastHit;
 
 var delayTime : float = 3;
 var currentDelay : float = 1;
 
 function Update () 
 {
 
     if(currentDelay <= 0){
         currentDelay = 1;
     }
 
     if(Input.GetMouseButton(0)){
     currentDelay -= Time.deltaTime / delayTime;
     Erase();
     }
     
     if(Input.GetMouseButtonUp(0)){
         currentDelay = 1;
     }
 
 
 }
 
 
 function Erase()
 {
     if(gameObject.tag == "Wooden Pick"){
     if(HitBlock() && currentDelay <= 0)
     Destroy(hit.transform.gameObject);
 }
 }
 
 
 function HitBlock() : boolean 
 {
     return Physics.Raycast(transform.position, transform.forward, hit, range);
 }
 
               Comment
              
 
               
              would you $$anonymous$$d posting the pertinent code directly on here? I was spammed by the mediafire site.
Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                