Hey guys, as you can see from the image above, the attachments for the Dynamic Faces Rig and the regular R15 rig are in different places! I’ve just come here to ask if this is normal, as I’ll have to swap my accessories over in that case. Thank you for your responses in advance!
I thought this was, but now it looks like the attachment positions are out of place when I look at it again.
I’ve written a quick script to convert attachments, this is specific to my use case, edit to your own needs
local Change_Service = game:GetService("ChangeHistoryService")
local Retarget_Table = {
["UpperChest"] = "UpperTorso",
["LowerChest"] = "LowerTorso",
["UpperLeftArm"] = "LeftUpperArm",
["LowerLeftArm"] = "LeftLowerArm",
["UpperRightArm"] = "RightUpperArm",
["LowerRightArm"] = "RightLowerArm"
}
local Rig = game.Workspace.Autorig.Rig:GetChildren()
Rig = Rig[1]
local Armour = game.Workspace.Autorig.Armour:GetChildren()
local Already_Attachment = true
Change_Service:SetWaypoint("Starting Autorigger..")
for Index, Value in Armour do
local Name = Value.Name:split("_")[2]
local Complementary = Rig:FindFirstChild(Retarget_Table[Name])
if Complementary then
if Already_Attachment then
local Attachment
for Index2, Value2 in Value:GetDescendants() do
if Value2:IsA("Attachment") then
Attachment = Value2
break
end
end
if Attachment then
local Complementary_Attachment = Complementary:FindFirstChild(Attachment.Name)
if Complementary_Attachment then
Attachment.WorldPosition = Complementary_Attachment.WorldPosition
print("Completed ".. Value.Name)
else
warn("Complementary attachment of ".. Attachment.Name .." belonging to ".. Value.Name .." not found!")
end
else
warn("Attachment of ".. Value.Name .." not found!")
end
end
else
warn("Complementary of ".. Value.Name .. " not found!")
end
end
print("-- Finished --")