Attachments are all good, they’re lined up via script
The issue is, is that it’s doing some weird scaling thing to the meshes and making them appear like that, does anyone know how to get rid of that behaviour. It would be greatly appreciated, thank you!
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 --")
The name is the armour component, 1st number is the original size , 2nd number is the size after it’s been put onto the character
The autocreated originalsize within each armour component is the same as the 1st number
Do you have any clue what’s causing it to change scale?
Roblox autocreates the welds, as it is an accessory. It’s the same way any catalog item works
Also the script, I run within studio itself just once to generate the correct attachment position. Then ingame, i can just parent the accessory to a rig
The autorig is in there, aswell as 2 example armour components. Within starterplayer i’ve also put a starter character where you can put the armour components after you’ve finished with them to test them ingame.