I am trying to move a hat a bit lower down a players body but it does not work.
This is the script:
wait() buff = game.ReplicatedStorage.buff:Clone() -- Wherever your hat is stored. game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) buff.Parent = character buff.Handle.CFrame = buff.Handle.CFrame + Vector3.new(0,5,0) print(5) end) end)
It doesn't work and the hat stays in its original position. Please help! This is the hat I am using: https://www.roblox.com/catalog/62745127/Thug-Bandana
Roblox hats are joined to the character's body parts via WeldConstraints. Setting the CFrame of the handle part doesn't alter the offset relation contained in the WeldConstraint.
You'll want to make these changes via properties in the Accessory instance itself (the hat)
Here's a picture of those properties where red effects position and blue effects rotation
It's worth noting that these 3 Vec3 properties exist as the resulting homogeneous CFrame components describing the weld.
Edit:
They're no longer using these properties by default, instead overriding them in situations where an attachment in the hat's Handle exists and matches the name of an attachment in one of the character's limbs. The weld offset is then positioned so that the Handle's attachment bears the identical CFrame of the limb attachment.
You'll want to assign to the Position property of the attachment that is a child of the hat's Handle part.