I have a JavaScript that whenever i press a button, in this case "j", it will play an animation (walk). But whenever i use the script on a FPS Controller in standard assets, it says all compile errors must be fixed before entering playmode.
function Update()
{
if(Input.GetKeyDown("w"))
{
// Plays the walk animation - stops all other animations
animation.Play("walk", Playmode.StopAll);
}
}
Does anyone know how to fix it?
↧