Putting an accessory on a player is easy enough, especially when I get them from free models. However I’m having a hard time making a preview for hats in a ViewportFrame. Hats don’t automatically move to the head when you put them as a descendant of a ViewportFrame.
My only idea was to position the hat like (for a R6 character)
I’m almost certain ViewportFrames don’t simulate physics in any way in which case assemblies will never update. Creating a weld (which is what that post does) will not position the hat at all.
I had a look in an alive character’s hats and it turns out the AttachmentPoint is the C1 of the hat weld, while the C0 is always 0, 0.5, 0. So doing hat.Handle.CFrame = head.CFrame * CFrame.new(0, 0.5, 0) * hat.AttachmentPoint:inverse() did the trick.