UnityNinja Community
Would you like to react to this message? Create an account in a few clicks or log in to continue.

UnityNinja CommunityLog in

UnityNinja - Video Game Development Community, including Resources, Forums, Marketplace & More.


descriptionAnimations  EmptyAnimations

more_horiz
I am following your steps on tutorial #3 for making an FPS game, and the animation won't work properly. It keeps saying :

MissingComponentException: There is no 'Animation' attached to the "M4A3" game object, but a script is trying to access it.
You probably need to add a Animation to the game object "M4A3". Or your script needs to check if the component is attached before using it.
walkingscript.Update () (at Assets/Guns/Gun Scripts/walkingscript.js:6)

descriptionAnimations  EmptyRe: Animations

more_horiz
I had a similar problem. I just restarted my project from the start.

descriptionAnimations  EmptyRe: Animations

more_horiz
Did it work TheReddestDawn?

descriptionAnimations  EmptyRe: Animations

more_horiz
Was just working on it and sadly no. I have the same error you have, and when I try to play the game what occurs is that the animation is constantly playing on a loop, no matter whether you are pressing W or if you're pressing nothing. I've tried taking the animation from my assets and putting it into the Gun (I parented my hands to my gun, so that's where the animation is) For some reason it still doesn't work  Sad 

descriptionAnimations  EmptyRe: Animations

more_horiz
Maybe we should ask MisterNinjaBoy

descriptionAnimations  EmptyRe: Animations

more_horiz
Hopefully they will see our post, alas for now we can just post spiderman memes.
Animations  Spiderman-Meme-9.jpgMeme-9

descriptionAnimations  EmptyRe: Animations

more_horiz
Lol  lol! 

descriptionAnimations  EmptyRe: Animations

more_horiz
The only way you are getting this error, is as stated by the error; You don't have the animation component attached to the model you added the script to. Make sure you do the parenting correctly (Gun and hands parented to each other) and then attached to main camera, then make sure the gun and hands (whichever the parent is) has animations, (and the animationcomponent) Then the script should be able to access the defined animation accordingly. (if you correctly named which anim to play in the script.)

descriptionAnimations  EmptyRe: Animations

more_horiz
I got this error:

The animation state walking could not be played because it couldn't be found!
Please attach an animation clip with the name 'walking' or call this function only for existing animations.
UnityEngine.Animation:Play(String, PlayMode)
walkingscript:Update() (at Assets/Guns/Gun Scripts/Walking/walkingscript.js:6)

Please help MisterNinjaBoy

descriptionAnimations  EmptyRe: Animations

more_horiz
privacy_tip Permissions in this forum:
You cannot reply to topics in this forum
power_settings_newLogin to reply