I have a bifold door (got it in a house a bought, not installed myself). The top part, away from the door jam, comes out of the track and swings open freely (pictures below) There is a place piece that looks like an upside down cylinder in the track, but the door piece will not stay in it as it opens.
Your missing the little plastic roller, which sounds like is in the track.
It is just a press fit. You could try taking it out of the track, putting in on the pin, and then taking a hammer and "peening" over the top of the pin. If look at the image above see on the pin with the roller has it's edges deformed bit. Or just buy a new one, they're not expensive.
Now there might be some reason the pin doesn't want to stay in the roller. Are the top of the doors reasonably parallel to the track? If not you'll have to adjust the door. Adjusting bifold can take a few tries to get right because they also need to meet properly in the middle. The edge of the closed door should be about 1/4" -3/8" away from the jamb. The top has a screw that allows the pivot to move in and out. The bottom is frequently a knurled pin and just sits in the bottom backet; lift slightly to adjust. Some hardware requires a thin wrench to loosen a screw to move the backet in and out.
That should get you started. Let me know if you need more help. If possible post some pictures of the door closed.
There's a few versions of those top guide rollers, yours looks like a top hat. If you can't pop it out with a finger or a screwdriver you may need to remove the top track to get it out.
From the picture it looks like the metal post of the guide is inside the track so hopefully you just need to put things back together. It might not hurt to slightly raise the door. Often the pin on the bottom is threaded so the height can be adjusted by screwing it in or out. You want to turn it clockwise when looking down towards the floor. You should be able to support the door slightly with one hand and twist with the other. Given they're mirrored and heavy, having a helper might be a good idea.
I went to home depot and bought Universal folding door replacement top guide by Johnson hardware. It came with 6 pieces. Unfortunately after an hour of trying, we could not get any of the "top hat" piece to fit it. The top hat piece would slide in the track, but the pin would not stay the plastic. I even took off the door and tried to push it on from there, but then I wasn't sure how I would slide it in the track.
In the midst of all of this, we did crack the mirror a bit on the side, so I'm going to give it one more go, but not much longer for fear of really breaking the door.
Just as a side note, should the "top hat piece" be in the track like this _I I_ with the pin going under it, or the other way with the "brim" on top and the cylinder hanging?
Bifold can be a little tricky and it's a LOT more difficult for me to give advice without seeing exactly what's going on. I suspect that the end of the door has to go up a little bit. There should be screw in the track near the jamb.
Take a pencil and mark the bracket on the track so you know where you're starting from. Then loosen that screw and slide the whole things towards the jamb about 1/8". See if that make a difference at the pivot. Obviously you can't get too close to the jamb or the door will bind.
Just as an aside, Johnson makes really good hardware. It's kind of pricey stuff and overkill for inexpensive hollow core doors but if yyou're hanging heavy doors, worth every penny.
Thank you for sharing this. Doors and windows are very essential part of our home. They give safety, security and provide nice and unique look to a home. There are many sources available online for doors and windows, But impact resistant stuffs can be a great choice.