How do I make a rolling ball jump but only on a specific tag?

I’m kinda new to this and would like to have the ball jump but in my code when the ball is against a wall you can just infinitely jump until its off the wall. I would like to know how i can fix this please. I tried making it to where you can jump only if on a plane but i couldn’t get it to work.

I’m not totally sure what method you’re using to make the ball ‘jump’, or how your scene objects are set up, or most importantly, what your script looks like. It’s hard to let you know what you are doing wrong when we don’t know what you’re doing.
Maybe post more code and/or details. That being said, maybe try checking for 2 tags instead of just 1. What I mean is if you are doing something like this:

 void OnTriggerEnter(Collider other) {
        if (other.gameObject.CompareTag("Ground"))
          {bool AllowJump = true;}
    }

 void OnTriggerExit(Collider other) {
        if (other.gameObject.CompareTag("Ground"))
          {bool AllowJump = false;}
    }

…and it’s giving you problems, you can try to add a 2nd check to get rid of collisions with unwanted objects. Such as:

  void OnTriggerEnter(Collider other) {
         if (other.gameObject.CompareTag("Ground"))
           {bool AllowJump = true;}
        else if (other.gameObject.CompareTag("Wall"))
           {bool AllowJump = false;}
     }

Something like that can help prevent jumping when you are touching a wall, because it can make sure that the AllowJump(can jump) is false WHENEVER the ball is not touching the ground but is touching a wall.

But, without knowing what is happening in your game, it is hard to say. There are lots of different ways to make a character jump. Physics force push, root-motion animation. moving an object’s transform directly through code, etc.
Which one are you using? It might explain why you are getting weird results.