I want the player to be able to jump only once he collects the ability to jump in 3d and I don't know how to, help pls.

(Like in Hollow Knight that the player need to collect the abillity to dash or double jump)

bool canJump = false;

//input
void Jump()
{
if(!canJump) return;
//otherwise do the jumpstuff
}

//powerup
void PickupJumpBoost()
{
canJump = true;
}

something like this will do it, just have a conditional boolean value that you can toggle, if it’s not met then dont perform the routine (the return does this)