Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is there a proper way to position manually welded hats?

Asked by
duckwit 1404 Moderation Voter
10 years ago

There are various reasons why the default ROBLOX hat system is untenable for my project, so I've resorted to welding them manually to the desired anatomical parts of my Character (I use a synthetic Head for animation purposes).

I inserted all the Hats that I wanted into a new place using InsertContent, and I'm welding them to the desired Head like-so:

--"hat" is a cloned hat from the original Hat Instances
--"character" is, of course, a reference to the character Model
handle = hat.Handle
hatWeld = Instance.new("Weld", handle)
hatWeld.Part0 = handle
hatWeld.Part1 = head
hatWeld.C1 = CFrame.new(hat.AttachmentPos) --<<--
handle.Parent = character
hat:destroy()

The problem is, that setting the C1 offset of the weld to hat.AttachmentPos doesn't always work - it positions some hats correctly and others not at all correctly (I've tried variants of C0/C1 and +/-attachmentPos, too).

How are we supposed to position Hats correctly using their default properties?

0
I wish I could help you, but I didn't understand anything you said XD MUSHR0OM 0 — 10y
0
Hopefully someone has experimented with this before as well, then. :) duckwit 1404 — 10y
0
But, whenever I use a LoadAsset script, it properly positions the hat on your head. Try experimenting with something like that. :D MUSHR0OM 0 — 10y
0
Sorry, but I don't want to use the default ROBLOX hat system, primarily because I don't want it to be positioned on the normal Head and because of the "=" key. duckwit 1404 — 10y
View all comments (4 more)
0
Okay, sorry that I'm not that able to help you. MUSHR0OM 0 — 10y
0
I don't have much knowledge of this in the scripting world. MUSHR0OM 0 — 10y
0
duckwit I think there is someone That can help.The person who made a human in Roblox with unique animation movements.Here's his profile link http://www.roblox.com/User.aspx?ID=1696758 Make sure to check out his game so you understand what I was talking about. Kozero 120 — 10y
0
Not all hats are made with the same sides facing upwards. The attatchmentPos might have to be tweaked for each individual hat. Just a guess though. OniiCh_n 410 — 10y

Answer this question