how to reload

i need the script for making the reload animation play when my ammo drops to 0 and when i press r please help

There isn't any "the script" for this. It depends on how your script and scene setup is made.

Whenever I have need for a script, I write one. :-D

Setting them from the parent and grabbing the materials from assets works. I can't get my prototype to break in the way you described. I think I would need to see the whole scripts to maybe solve the this.

1 Answer

1

Do you have an animation? if so you could do this

function Update ()
{
		if(ammo <= 0)
			{
				Animation.Play("Reload Animation");// The name o you anim goes inbetween the brackets
			}

@Christian H Pedersen LOL

This is much easier in C#: public void Update () { if(ammo <= 0) { Animation.Play("Reload Animation");// The name o you anim goes inbetween the brackets }