How do I add force in the on trigger

Hi, I have this simple problem, I have an object and a group of objects (prefab) named coin. All I have to do is addforce to the coins when they enter the main object.
The collision/trigger thingy works, when I change the
“coin.rigidbody.AddRelativeForce (0, power, 0);” line, it works so the problem is with that line.

var coin : GameObject;
static var speed : int;
var power;

function Start () {
InvokeRepeating("checking", 0, 0.3);

function OnTriggerEnter ( collision : Collider){

 coin.rigidbody.AddRelativeForce (0, power, 0);


function checking (){
power = speed/3;


(the var power is set in other script

The problem is you want to add an instantaneous force, where AddForce is applied over time in physics. For an instantaneous force in your case of entering a trigger volume, you need to use ForceMode.Impulse :

rigidbody.AddForce( transform.up * power, ForceMode.Impulse );

Links :