I need help for a scaling script.

Help

the current script I have is below. Its just for some reason whenever I tweak the code to fix the neck nothing works. The problem is that the neck gets stuck in the players body.

local Scale = 1.5

script.Parent.Trigger.Touched:Connect(function(hit)

local character = hit.Parent
local player = game.Players:GetPlayerFromCharacter(character)
if not player then return end
if character:GetAttribute("Scaled") then return end
character:SetAttribute("Scaled", true)

local humanoid = character:FindFirstChildOfClass("Humanoid")
if not humanoid or humanoid.RigType ~= Enum.HumanoidRigType.R6 then return end

local scaleVector = Vector3.new(Scale, Scale, Scale)

-- SCALE BODY PARTS
for _,part in pairs(character:GetChildren()) do
if part:IsA("BasePart") then
part.Size *= scaleVector
end
end

-- SCALE MESHES (skip head mesh so it doesn't double scale)
for _,mesh in pairs(character:GetDescendants()) do
if mesh:IsA("SpecialMesh") and mesh.Parent.Name ~= "Head" then
mesh.Scale *= scaleVector
end
end

-- SCALE JOINTS
for _,joint in pairs(character:GetDescendants()) do
if joint:IsA("Motor6D") then
joint.C0 = CFrame.new(joint.C0.Position * scaleVector) * (joint.C0 - joint.C0.Position)
joint.C1 = CFrame.new(joint.C1.Position * scaleVector) * (joint.C1 - joint.C1.Position)
end
end

-- SMALL NECK FIX (keeps head above torso)
local torso = character:FindFirstChild("Torso")
if torso then
local neck = torso:FindFirstChild("Neck")
if neck then
neck.C0 = CFrame.new(0, Scale * 50.0, 0)
end
end

-- FIX ACCESSORY WELDS (hair / hats)
for _,acc in pairs(character:GetChildren()) do
if acc:IsA("Accessory") then
local weld = acc.Handle:FindFirstChildOfClass("Weld")
if weld then
weld.C0 = CFrame.new(weld.C0.Position * scaleVector) * (weld.C0 - weld.C0.Position)
weld.C1 = CFrame.new(weld.C1.Position * scaleVector) * (weld.C1 - weld.C1.Position)
end
end
end

-- SCALE TOOLS
for _,tool in pairs(character:GetChildren()) do
if tool:IsA("Tool") then
local handle = tool:FindFirstChild("Handle")
if handle then
handle.Size *= scaleVector
end
end
end

-- FIX HIP HEIGHT
humanoid.HipHeight = humanoid.HipHeight * Scale

-- CAMERA DISTANCE FIX
player.CameraMaxZoomDistance = player.CameraMaxZoomDistance * Scale

end)

Posted Mar 6, 2026, 4:00 AM UTC

16
Loading comments…