How can i trigger a script by collision with a box? I have a box collider on a object and a script on another object, how can i activate the script using the box Collider ?
Hm? It is not clear to me what you are trying to do exactly. You want to access a script that is attached to the GameObject you assigned to “other”? Then you can use something like this:
Note you declared “other” as being a GameObject, so
other.Play("celebrate"); shouldn’t work, since a GameObject does not have a function “Play” - it shouldn’t even compile. If you’re trying to start an animation named “celebrate”, use