I’m doing a “Jumppad” Basically “Player” runs hits the jumpad, Then the trigger on the jumppad should become active when player runs into it, and this script should work, But for some reason it isn’t can anyone see the problem?
#pragma strict
var strength : int = 10; // Strenght, how high will the jumppad make the player jump
// make sure to check the Is Trigger checkbox in the Box/mesh/whatever collider
function OnTriggerEnter(col : Collider){
// Make sure the "Player" tag is set on the player
if(col.CompareTag("Player")){
col.gameObject.GetComponent(CharacterMotor).SetVelocity(Vector3.up * strength);
}
}
Thank you if you can help me,
Luke