Problem with animation script! Pleez help!

So i am very new to using Unity and not very good at scripting, but i am trying my best :slight_smile:

Can someone tell me what the problem is with this code?

function Update ()
{
if(Input.GetKeyDown(“w”))
{
// Plays the walkinganimation - stops all other animations
{
animation.Play(“Walkinganimation” , PlayMode.StopAll);
}
}

Ah i found out what the issue was :slight_smile:
I just need one more “}” at the end :slight_smile:

To me it looks like you had one extra bracket after the if statement

function Update ()
{
if(Input.GetKeyDown("w"))
{
// Plays the walkinganimation - stops all other animations
// { <- this bracket wasn't needed
animation.Play("Walkinganimation" , PlayMode.StopAll);
}
}

Also use CODE tags when posting code on the forums, just for next time you post