Simple jump code?

Hey I need a simple jump code. It is a 3d game that is first person and i have forward backward and side to side and now i need jump. i have a jump animation. I also want it to keep jumping when the spacebar is held down please help!

You Could Use Rigidbody.addforce or rigidbody.addrelativeforce. But I’m not sure if your character is rigidbody or not…

Sorry If that didnt help much…

set your rigid body gravity scale to 10 or less. this will bring the character faster. now add a xy vector with the speed you want to jump with. use rigidbody.velocity= vector.