how do they keep the hat on the animatronics?

glue? magnets?