Unity Gun Prefab Code Messedup

MrlilkatoMrlilkato Posts: 25Member
I made a Error on some code and i cant figure it out any help it makes the RT Shoot The Bullet. The Error is PrefabShooting.js(14,1): BCE0044: expecting EOF, found '}'.
_______________________________________________________________________________
//Simple prefab shooting script
#pragma strict
var theBullet : Rigidbody;
var Speed = 20;

function Update () {
    if (OuyaExampleCommon.GetButton(OuyaSDK.KeyEnum.BUTTON_RT, OuyaExampleCommon.Player(0))
    )
        var clone = Instantiate(theBullet, transform.position, transform.rotation);
        clone.velocity = transform.TransformDirection(Vector3(0, 0, Speed));
       
        Destroy (clone.gameObject, 3);
    }
}

-A Small And Short Game Dev.

Comments

Sign In or Register to comment.