Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to make hats connected to a head?

So I'm making a character spin. So when you're in the shop, you can see what the outfit looks like and the character spins, but the hats spin by themselves and aren't connected to their head.

video of what it looks like vv

https://twitter.com/OfficialMunian/status/825585703266312192

So as you see, the hats like go through the head, and I do not want that I want it to stay how it would typically stay. MAIN POINT --> That's why I need to know how hats can be connected to the head, so they can stick with it and not be apart separately.

1 answer

You can Weld the hat to the player's Head.

There are 3 main things you should worry about while welding:

  • Part0: An object. It must always be set to the part the weld is in for the weld to work.

  • Part1: An object. It will attatch to Part0.

  • C0: The attachment offset.

Example of welding a hat to a head:

local part0 = workspace.Goulstem.Head --This is the head.
local part1 = workspace.Hat --This is the hat.

local w = Instance.new("Weld",part0)
w.Part0 = part0
w.Part1 = part1.Handle

Note: The attachment point may be off or rotated incorrectly on the head. To fix this, you can edit the C0 property

2 comments

0

It enters the weld but it stays the same. Also, what is Co? Attachment offset?

0

Make sure the hat's Handle is unanchored. Welds attach two parts together. The C0 property will give an offset for that attachment.

This discussion is preserved as it was. New answers, comments, and votes are closed.