Have you tried using other.tag instead of other.gameObject.tag? The example I learned from doesn’t include gameObject. Maybe the gameObject of the crate isn’t tagged but something lower in the hierarchy is.
I know you’re talking about the crate… What’s your object hierarchy?
You have a few contradicting statements here…
You say you want your crate to respond to gravity, so it has a rigidbody, and I assume a box collider. Thats fine, but non-trigger colliders dont respond to trigger events, only collision.
You dont want it to fall through the ground, so it cant be a trigger, unless you have setup a compound collider system, but since you said its a crate with a rigidbody, I doubt this.
But I dont want to use a collision event. I dont want it to actually look like its hitting anything. I dont understand why it works with the player but not the crate.
Your setup is still not clear, but i also think that the questions asked by others arent clear
the create needs a rigidbody (with gravity), and not a trigger
then this ‘button’ which has the posted script must not be rigidbody, but is a trigger.
lastly it seems you still didnt read the docs:
function OnTriggerEnter (other : Collider) {
you have
function OnCollisionEnter (other : Collision) {