#StarterPlayer bug

1 messages · Page 1 of 1 (latest)

spark ginkgo
#

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

oblique parrot
#

from what i understand you can probably do this quite easily by just getting a rig, renaming it to StarterCharacter and putting it into starterplayer

#

if you want to change the avatar then try getting the avatar items from the loacl player and putting it into the startercharacter model

#

i havent really gotten into avatar stuff tho so im not quite sure how it works

spark ginkgo
#

I understand what you’re saying, but to do the script I need the normal dummy to have another name and not StartedCharacter

#

it would break the script, isn't it?

#

I mean, when you get into the game you will have your normal avatar. will only change the height of your avatar like the dummy

oblique parrot
oblique parrot