Equip custom accessories

Hi! How should I go about equipping the following hat to a character in a script?
image

Roblox has added Humanoid:AddAccessory()
also, make it an accessory.

Ah, thanks for letting me know, I shall test this now.

Do you know a way of positioning it so it’s not like this XD.

I believe theres some property for that inside of the accessory, also, heres the link api about this: Humanoid | Roblox Creator Documentation

local faceFrontAttachment = Instance.new("Attachment")
faceFrontAttachment.Name = "FaceFrontAttachment"
faceFrontAttachment.Position = Vector3.new(0,-0.24,-0.45)
faceFrontAttachment.Parent = handle

I think I have to position it using a attachment.