Hi I’m trying to make a script that will make my player shiver whenever he is in a zone and aims but for some reason when I switch animations on entering a zone it just jerks down real fast and then goes back to the original aiming animation here is my script.
Thanks in advance ![]()
var PlayerAnimSec : GameObject;
function Start () {
}
function Update () {
}
function OnTriggerEnter(){
if(GameObject.Find(“Animations”).GetComponent(Player).PlayerState==3)
WaitForSeconds(5.0);
PlayerAnimSec.animation.Play(“ShiverAim Animation”);
PlayerAnimSec.animation.Stop(“AimingIdle Animation”);
}
function OnTriggerExit(){
if(GameObject.Find(“Animations”).GetComponent(Player).PlayerState==3)
WaitForSeconds(10.0);
PlayerAnimSec.animation.Stop(“ShiverAim Animation”);
PlayerAnimSec.animation.Play(“AimingIdle Animation”);
}