- Home /
switch > door animation
hi i need a door animation to play when i hit a switch, i put my script on the switch but it keeps telling me that the player has no animation attached to it when i hit the button.. here is my script. thank you
public GameObject door;
// Use this for initialization void Start () {
}
// Update is called once per frame
void OnTriggerStay (Collider door) {
if(Input.GetKey ("v")){
door.animation["Door"].speed=1;
}
} }
Comment