Why is my character not sticking to platform? (Script included)

Hey, having a little trouble with my game. Basically, I have a moving platform inside my game that moves from left to right on a loop. The player can jump on the platform but as soon as they hit the platform, they slide off (do not stick to it). I have tried doing this with OnCollisionEnter and OnTriggerEnter but it doesn’t seem to work.

I know this has been asked before but I cannot relate to any of the answers. Can anyone point me in the right direction? I attach this code to the moving platform :

function OnTriggerEnter (other : Collider) {
    if(other.gameObject.tag == "Player") {
        other.transform.parent = transform;
    }
}

function OnTriggerExit (other : Collider) {
    if(other.gameObject.tag == "Player") {
        other.transform.parent = null;
    }
}

Player tag = Player ||
Platform tag = Platform.

If you need anymore information, I will be here for a while so feel free to ask. I hope you guys can help :smiley:

If I am understanding correctly, your 3D model slides across the floor as if it were Icey grounds or something ?

There are two ways that I know of that you can go about doing this.

  1. You can set the Rigidbody to kinetic. ( Less efficient )
  2. You will need to change the physics material of the rigidbody .