Pic tells us nothing, need to know dimensions.I’m attaching a picture very similar to what I was using.
Was it attached to the blocks?No it’s pretty solid
Looks like it's just sitting there.
Follow this^^^ good advice.For the bar itself, a 2x3, 2x4, thick branch (2" diameter or more) will all work fine. If using wood boards, round off edges with sandpaper to make it more comfy.
Instead of dinking around with low roosts, build them for the future, they will figure out how to get up there. You can use those blocks as 'steps' if they can't fly up on their own after you put them up there yourself a few times.
Here some tips about heights that might help:
https://www.backyardchickens.com/articles/coop-stack-up-how-high-stuff-works-well.73427/