I am trying to fit items into an 1.75x size R6 rig. It, of course, has a bunch of attachments inside its parts.
I am trying to change these attachment’s positions, when scaling, in order to make the items fit.
I am using the following function to do so:
local scale = 1.75
--SERVICES--
local InsertService = game:GetService("InsertService")
--GENERAL FUNCTIONS--
function module.GiveAccessory(Character, Id)
if not Character:GetAttribute("Scaled") then
Character:SetAttribute("Scaled", true)
for i, desc in pairs(Character:GetDescendants()) do
if desc:IsA("Attachment") then
desc.Position *= scale
end
end
end
local Humanoid = Character:FindFirstChildOfClass("Humanoid")
local model = InsertService:LoadAsset(Id)
local Accessory = model:FindFirstChildOfClass("Accessory")
if Accessory == nil then return end
local Handle = Accessory:FindFirstChildOfClass("Part")
local Mesh = Handle:FindFirstChildOfClass("SpecialMesh")
Humanoid:AddAccessory(Accessory)
Handle.CanCollide = false
Mesh.Scale *= scale
model:Destroy()
end
This, however, makes it so some accessories need a higher multiplier:
While others need less:
How do I know what scaling multiplier I need?