Hello, I try to make your character when entering the game a small dummy. The problem comes when I start it, my arms and legs go to the opposite side. Then try to change the position of the dummy parts, but completely change the place clothes and the animation of the dummy. Then I think it’s a problem of the script but I can’t find where is this fault. Could someone help me? sorry.
Code>
local Players = game:GetService("Players")
local Workspace = game:GetService("Workspace")
local function adjustCharacterSize(character)
local babySizeModel = Workspace:FindFirstChild("Baby Size")
if not babySizeModel then return end
local partsToMatch = {
["Head"] = "Head",
["Torso"] = "Torso",
["Left Arm"] = "Left Arm",
["Right Arm"] = "Right Arm",
["Left Leg"] = "Left Leg",
["Right Leg"] = "Right Leg"
}
for partName, babyPartName in partsToMatch do
local charPart = character:FindFirstChild(partName)
local babyPart = babySizeModel:FindFirstChild(babyPartName)
if charPart and babyPart then
charPart.Size = babyPart.Size
end
end
-- Adjust Motor6D joints
for _, joint in character:GetDescendants() do
if joint:IsA("Motor6D") then
local part0 = joint.Part0
local part1 = joint.Part1
if part0 and part1 then
local babyPart0 = babySizeModel:FindFirstChild(part0.Name)
local babyPart1 = babySizeModel:FindFirstChild(part1.Name)
if babyPart0 and babyPart1 then
joint.C0 = babyPart0.CFrame:ToObjectSpace(babyPart1.CFrame)
joint.C1 = CFrame.new()
end
end
end
end
end
Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(adjustCharacterSize)
end)
for _, player in Players:GetPlayers() do
if player.Character then
adjustCharacterSize(player.Character)
end
end