#HumanoidRootPart is not a valid member of Model "TransformedCharacter"

20 messages · Page 1 of 1 (latest)

glossy leaf
#
local Dummy = workspace.Dummy

Part.Touched:Connect(function(hit)
    local player = game.Players:GetPlayerFromCharacter(hit.Parent)
    if player then
        local characterId = player.CharacterAppearanceId
        if characterId ~= 0 then
            local humanoidDescription = game.Players:GetHumanoidDescriptionFromUserId(characterId)
            if humanoidDescription then
                local cloneCharacter = Dummy:Clone()
                cloneCharacter.Name = "TransformedCharacter"
                cloneCharacter.HumanoidRootPart.CFrame = Part.CFrame
                cloneCharacter.Parent = workspace

                for _, child in ipairs(cloneCharacter:GetChildren()) do
                    if child:IsA("BasePart") then
                        child.Anchored = true
                    end
                end

                Dummy:Destroy()

                player.CharacterAppearanceLoaded:Wait()

                local transformedCharacter = game.Players:CreateHumanoidModelFromDescription(humanoidDescription)
                transformedCharacter.Name = "PlayerCharacter"
                transformedCharacter.HumanoidRootPart.CFrame = cloneCharacter.HumanoidRootPart.CFrame
                transformedCharacter.Parent = workspace

                cloneCharacter:Destroy()

                player.Character = transformedCharacter
                player:LoadCharacter()
            end
        end
    end
end)
#

I don't know why im getting this error I have tried many ways to fix it but no

tranquil dock
#

weird

little anvilBOT
#

studio** You are now Level 1! **studio

arctic matrix
#

Does it have a humanoid root part?

glossy leaf
#

Yes

arctic matrix
#

Well clearly not

#

Are there any other scripts affecting it

glossy leaf
#

Nope

#

That's the only one

#

In the game

#

Uno what

#

I'll show you the dummy

arctic matrix
#

run the game and see if its still there

glossy leaf
#

Still there

arctic matrix
#

can u send ur project file

glossy leaf
#

sure

arctic matrix
#

I’ll check it out in a bit and see if I can fix it