Well i’m very new to this and i want to make a bouncy platform that my player can jump on. I have looked the script up and i wrote everything in, but when i go out of it and try to play my game a error comes up and says: BCE0019: “Movement” is not a member of “UnityEngine.Component”
Here is my script:
var BounceAmount : float; //How high should we bounce?
function OnTriggerEnter(other : Collider){ //Bouncy trigger
if(other.tag == "Player"){ //Is this the player?
var P = GameObject.FindGameObjectWithTag("Player"); //Grab the player object
//Access CharacterMotor Script
//Set vertical speed of movement to bounce amount.
P.GetComponent ("CharacterMotor").movement.velocity.y = BounceAmount;
}
}
I don’t know what to do so please help me.