How to make Rigidbody First Person Jump with button or mouse click?

I am making a mobile version of my game and I have a joystick and panel with scripts that allow the standard RigidbodyFirstPerson move and rotate with some tweaking of their original code (adding RunAxis and JumpAxis) but as many times as I’ve tried I can’t get the jump to work, I don’t think the code works for it. I followed this video

and have spent so long trying to get this darn thing to work. If I can get any suggestions I would really appreciate it. Is there another script I could create to just make it jump with a mouseclick

I ended up taking all the jump scripting from this tutorial and tried my own code. It doesnt work either, this is it

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
public class MoveUp : MonoBehaviour
{
public Rigidbody rb;
void Start()
{
rb = GetComponent();
}
public void OnPointerDown(PointerEventData eventData)
{
transform.Translate(0, 10, 0);
}
}

Im new to scripting, probably doing it completely wrong but I thought there might be a way to do it like this, but not sure

First, please use code block. It’s that "Code: " section in the editor. Makes it so much readable and doesn’t require much more than cut’n’pasting the code as normal text here.

Please open the reference manual and read the RigidBody section. Generally you want to move RigidBodies so that you apply move forces, like this:

rigidbody.AddForce(new Vector3(0, 1000, 0), ForceMode.Impulse);

There are different ForceModes than you can apply, you find them in the manual.

If your RigidBody is in kinematic mode (isKinematic true or switched on in the Inspector), you can use RigidBody.MovePosition:

Transform.translate might create some artifacts/jittery movement.

You might find article useful to get an overall picture about differences of Character Controller and ra RigidBody character controller: