Help on Jumping

I was able to have my character jump in the air but he doesn’t land. When I applied the gravity on my rigibody, I just get a game over as soon as I start my level. Without the gravity, my level runs smoothly. Any suggestions?

here’s the script I’`m using for jumping

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
    void FixedUpdate() {
        if (Input.GetButtonDown("Jump"))
            rigidbody.velocity = new Vector3(0, 10, 0);
        
    }
}

Note:
Not using character controller

your jump is fine. gravity is fine. the game over is whats bugged.

Do you get game over when your character dies? ok what causes him to die? im guessing if you did a Debug.log on the variable that changes when he dies you’d see he was insta dying.

That means gravity is pushing him against something and touching that something is killing him.

So you need to post your game over code if you want help.

Remember the terrain is a collider. touching a collider and dying means touching the terrain kills him.