I made a Javascript that play a reloading animation when R is pressed, and put it in my weapon, that have the reloading animation. The problem is that when i press R in play mode, Unity say the following:
“MissingComponentException: There is no ‘Animation’ attached to the “SubmachineGun” game object, but a script is trying to access it.”
What i did wrong? The weapon have child objects like magazine,body etc… is this the problem? What i need to do? Pls help!
OBS: I wasn’t able to upload the print. It’s “too heavy”