mistake in the script

Hello :slight_smile:

I need this script for my animations that they can change when I press the button “w”. But there’s a mistake and I don’t know what I have to change that it works.

Hope someone can help me

Looks like your using C# code in Javascript.
http://docs.unity3d.com/Manual/GenericFunctions.html

Try

GetComponent.<Animation>().Play(....

Yeah you’re right, thank you :slight_smile: