Hi! So i want resize r6 player model. Since i was too lazy to write code myself i took it from here: How to size a r6 Player?
And so everything i was changing script to make it work fine with my game. And everything is fine. Expect legs. Their weld doesn’t changes at all.
Here script:
function module.resizeR6(char,scale)
local Motors = {}
table.insert(Motors, char.HumanoidRootPart.RootJoint)
for i,Motor in pairs(char:GetDescendants()) do
if Motor:IsA("Motor6D") then
table.insert(Motors, Motor)
end
end
for _, v in pairs(Motors) do
if v.Name ~= "Right Hip" or v.Name ~= "Left Hip" then
v.C0 = CFrame.new((v.C0.Position * scale)) * (v.C0 - v.C0.Position)
v.C1 = CFrame.new((v.C1.Position * scale)) * (v.C1 - v.C1.Position)
else
v.C0 = CFrame.new((v.C0.Position * scale)) * (v.C0 + v.C0.Position)
v.C1 = CFrame.new((v.C1.Position * scale)) * (v.C1 + v.C1.Position)
end
end
-- RESIZE PARTS
for _, Part in pairs(char:GetDescendants()) do
if Part:IsA("BasePart") == false or Part.Name == "CharacterHitbox" then continue end
Part.Size = Part.Size * scale
if Part.Name == "Head" then
Part.Mesh.Scale = Vector3.new(1.5* scale, 1.5* scale, 1.5* scale)
end
end
-- RESIZE ACCESSORIES
for _, Accessory in pairs(char:GetDescendants()) do
if Accessory:IsA("Accessory") == false then continue end
Accessory.Handle.AccessoryWeld.C0 = CFrame.new((Accessory.Handle.AccessoryWeld.C0.Position * scale)) * (Accessory.Handle.AccessoryWeld.C0 - Accessory.Handle.AccessoryWeld.C0.Position)
Accessory.Handle.AccessoryWeld.C1 = CFrame.new((Accessory.Handle.AccessoryWeld.C1.Position * scale)) * (Accessory.Handle.AccessoryWeld.C1 - Accessory.Handle.AccessoryWeld.C1.Position)
local AccessoryMesh = Accessory.Handle:FindFirstChild("Mesh")
if AccessoryMesh then
Accessory.Handle.Mesh.Scale *= scale
end
local AccessoryPart = Accessory.Handle:FindFirstChild("Part")
if AccessoryPart then
Accessory.Handle.Part.Scale *= scale
end
end
end```