Backgammon question

Can anyone tell me the rules in a certain situation. I am not good at describing it. I was afraid of being blotted off the board. I got a 3 and a 4. If I moved the 3 first it meant that I could not use the 4. That was good, as moving 4 left me open to blot.
My opponent said I must play the 4 first. Is this right?
I am sorry if I explained it badly.

You must use both dice if legally possible.

One reference:

Another:

And:

Based on this, you had to use the four, but if it had been to your advantage to use the four (instead of the three), you could have prevented yourself from using the three without a problem.

There comes a situation when you most of your pieces in your homeboard and the dice comes a certain way, you can move one piece first to avoid moving the other. Is this legal?

I found the answer --you must play both numbers of a roll if possible. Sometimes this means having to make a move you don’t like so that your other number can also be played.

If you can play one number but not both, then you must play the higher one.

I should add that not all computerized/online versions of the game recognize this “larger number first” rule, as I’ve exploited the situation you describe several times. It sounds like something you’d want to clarify with your (human) opponent before starting.

I think you are wrong according to this websitelink