Hi, i need my gun to shoot with a muzzle flash. i have a prefab but it just loops and loops
i want it so that i can right click and it plays the prefab thing.(hope i make sence)
all helped would be appreciated.
Thanks in advance, orangec0w
oh here's the shoot script to if you need it:
var projectile : Rigidbody;
var speed = 10;
function Update (){
if(Input.GetButtonUp("Fire1"))
{
clone = Instantiate(projectile, transform.position, transform.rotation);
clone.velocity = transform.TransformDirection(Vector3(0,0, speed));
Destroy (clone.gameObject, 5);
audio.Play();
}}
↧