Your balls are worn dude
Valve body in the gearbox, its a classic BMW gearbox failure.
Good news is its not too serious, what happens is you have liittle plastic balls in the gearbox that runs on tracks on a plastic chassis inside the gearbox, and with time, those balls wear out.
Valve bodies can be replaced quite easily, just do not leave it, you could let the box self destruct and then its a a 30k repair instead of 5k.