Problems with Triggers

A trigger script that I’m using activates too early displaying the text “Hi” before any objects hit it. also how can I make sure its the player hitting the object
function OnTriggerEnter (other : Collider) {

Check the collider’s size.

You can look at == “Player” or other.tag == “Player” or whatever (assuming your player object is called or tagged “Player”)

In the OnTriggerEnter function, do an “if” test to see if it’s the player hitting the trigger. Also, make a “Player” tag if you haven’t already, they’re pretty good for doing these simple checks.

Might look something like this

function OnTriggerEnter(other : Collider){