- Home /
This post has been wikified, any user with enough reputation can edit it.
my script not working..!!!
hi guys....please help me...i try to use this script for open the door .... but its not working... i made animation for door and its work..but this not working......please helppppp !!!!
var RayCastLenght = 5;
function update() {
var hit: RaycastHit;
//check if we colloding
if(Physics.Raycast(transform.position, transform.forward, hit, RayCastLenght)) {
//...with a door
if(hit.collider.gameObject.tag == "door") {
//open the door
hit.collider.gameObject.animation.Play("open door"); } } }
Comment
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Trap Door Question 1 Answer
Make doors open with different keys? 1 Answer
Help with door animation 1 Answer