Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

How would I go about inserting a hat onto someone using scripts?

Asked by 6 years ago

Title, tried to use scripts to put a hat on someone, it connected strangely.

My friend told me to weld a part onto their head (with a hat mesh), could anyone possibly tell me how to do that or link me to a page, it would be greatly appreciated.

1 answer

Log in to vote
1
Answered by
Gamenew09 175
6 years ago

Clone the Hat object into a character, or you can create the hat object the put the parts and all the properties needed for the hat.

Create Hat Example: (This is from a free model btw) ~~~~~~~~~~~~~~~~~ h = Instance.new("Hat") p = Instance.new("Part") h.Name = "Americasweetheart" p.Parent = h p.Position = hit.Parent:findFirstChild("Head").Position p.Name = "Handle" p.formFactor = 0 p.Size = Vector3.new(1,1,2) p.BottomSurface = 0 p.TopSurface = 0 p.Locked = true script.Parent.Mesh:clone().Parent = p h.Parent = hit.Parent h.AttachmentForward = Vector3.new(-0, -0, -1) h.AttachmentPos = Vector3.new(0, 1.15, -0.05) h.AttachmentRight = Vector3.new(1, 0, 0) h.AttachmentUp = Vector3.new(0, 1, 0) ~~~~~~~~~~~~~~~~

If I helped please set me as the answer and vote me up!

Ad

Answer this question