- Home /
MuzzleFlash for gun
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(); }}
Your answer
Follow this Question
Related Questions
Particles Energy vs Emissions 2 Answers
Making gun fire particle 2 Answers
Bootcamp destroy a Enemy 2 Answers
Gun Muzzle Flash Effect 0 Answers
Rotate the textures in the particle system to direction of the particle system? 1 Answer