I’m fairly new to unity I’m trying to do a running animation but the problem is unexpected token
heres the script
function Update () {
if(Input.GetButtonDown(“leftshift”)) {
GetComponent.().Play(“RUNNING”);
{
{
Your code block(The curly braces, you know theses {} need to in sync, for each open { you must close }.
You have a dot operator after GetComponent and before the parenthesis.
Try:
function Update () { // open
if(Input.GetButtonDown("leftshift")) { // open
GetComponent.<Animation>().Play("RUNNING"); // remove the period/dot after GetComponent, unless you're using a generic, if using Animator do GetComponent.<Animator>().Play("RUNNING"), if using Animation then use GetComponent.<Animation>().Play("RUNNING"), or AudioClip, etc, assuming animation.
} // close curly
} // close curly