So I made this playerMovement script. And I don’t see why I am not able to jump. I have no compiler errors. (I am a beginner so please be gentle xD).
https://paste.ubuntu.com/p/8FyK4V6by8/

Just step through your code in the debugger and see why it’s not firing. Could be that Jump for whatever reason is being set to false, or that your Force magnitude isn’t great enough to actually lift the rigidbody’s mass.
Input.GetKeyDown(KeyCode.Space) does that function return a bool ?
Looks like it should work. Are you sure your other ground object has the correct tag?

Also, try Debug.Log()ing
Where do I run “Debug.Log() ing”? If you mean something similar to print(jump); I’ve done it and it says either “true”, or “false” in the console when I press the spacebar. Which I don’t see why would be… Because I am always inside the trigger area, thus it should always say “true”, and not randomly “false” at times… And yes, the ground object has the correct tag. Also tried adding a force of a whopping 10000, which still didn’t make the character jump.

To make it clear why I need a trigger area… It’s because I don’t want the character to just indefinitely float in the air if “space” is spammed or something. So when it is in touch with the ground, it is “true”, and off is “false”. Hope this explanation was thorough enough.

I wish there was a way of sharing editable unity projects, but I’ll set a list of everything I’ve done so far in my own project if anyone is interested in trying for themselves.

I created two planes, one is a trigger-plane, the other is a collider-plane.
I created a cube as the player, added a character controller component, and childed a camera to it. The cube’s position is 0.5 on the y-axis, while the ground is zero.

I made the playerMovement script and added it to the playercube: https://paste.ubuntu.com/p/8FyK4V6by8/ Make sure to drag and drop the CharacterController component where it says “Controller” in the script. This also goes for the rigidbody of the player. Drag that over to where it says “rb”.

I made a playerLook script and added it to the player’s childed camera: https://paste.ubuntu.com/p/KHKVJYjGNp/ Make sure to drag and drop the Player object to where it says “Player Body” in the script.

At this point, I am stuck on why the player can’t jump. Would appreciate it if anyone took their time to look over this problem in unity if my given steps are understandable.

What version of unity are you using? I know that the 2019 version has a bug where the spacebar doesn’t work in the editor. Try setting the jump to a different key in the input manager and try jumping with that key.
Nope, still nothing…

Put Debug.Logs in your collision methods. I suspect your ground check is not working correctly.

In both OnTriggerEnter and OnTriggerExit, put this as the last line of code:
I’d also recommend using CompareTag, e.g.:

This is more robust than checking the tag’s value, as it will give you a warning if the tag doesn’t exist (and is apparently more performant too).
Another possibility is that your character controller script is overriding movement. The controller might be setting the character movement according to input, in which case it might effectively cancel any physics forces on the player.

EDIT: you also would probably get better help on r/Unity3D, as your issue is Unity specific, and really a C# code issue.

source