How to clone dummy Position and Posture to the player

  1. What do you want to achieve? It Is very simple but somehow, for me, is complicated; I’m trying to create a lobby where the player stays in a certain position and posture, like the dummy in the picture.
    18.11.2022_15.20.29_REC

  2. What is the issue? I can set the player’s position, but I don’t know how to clone the “posture.”

  3. What solutions have you tried so far? tried to set player humanoidRootPart.Cframe = dummy…CFrame, also i tried to clone all humanoidParts Rotation/Position to player

I’m NOT looking for some1 to script this for me but point me in the right direction.

Thank you

I would advice making it a loop animation
set the position and play the animation on the player then anchor the player

1 Like

You could make the pose an animation and apply it to the player
Then just freeze the animation to keep the pose

Or if you could use the dummy as a template and turn it into the player using somethin’ like this:

local PlayerService = game:GetService("Players")

local PlayerAppearance = PlayerService:GetHumanoidDescriptionFromUserId() --Put UserId
script.Parent.Humanoid:ApplyDescription(PlayerAppearance)
1 Like

thanks for the fast reply will try that for sure :grinning:

so this only works on the server side, so since the lobby is local script it requires a remote event or some kinda of property to communicate. Will try that in a few and give the feed back , thank you

1 Like

Maybe this can help someone else
So after testing your solution @2DGrlsCantBr8kHearts, the dummy loses his posture and I don’t know why.

I also tested GetAccessories and appended them to the dummy, but the result was weird, so I came up whit this. Basically, I copy all Motor6D C0 and C1 values from each part of the dummy and set them to a cloned player.

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")
--

local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local Camera = workspace.CurrentCamera
--

-- dummy exists already
if workspace:FindFirstChild("Dummy"..Player.UserId) then
    return
end


-- change camera view
repeat wait()
    Camera.CameraType = Enum.CameraType.Scriptable
until  Camera.CameraType == Enum.CameraType.Scriptable

Camera.CFrame = workspace.Porch.Camera.CFrame

--
local DummyDefault = workspace.Dummy
local dummyData = {}

--
------------------------- get dummy data
--
for i, part in pairs(DummyDefault:GetChildren()) do 
    --
    if part:IsA('MeshPart') then
        --
        for i,instance in ipairs(part:GetChildren()) do
            --
            if instance:IsA("Motor6D") then
                dummyData[instance.Name] = {instance.C0,instance.C1}
            end
        end
    end
end

dummyData.orientation = DummyDefault.HumanoidRootPart.Orientation
dummyData.position = DummyDefault.HumanoidRootPart.Position
--
DummyDefault:Destroy()
--
------------------------- Clone player 
--

Character.Archivable = true
local playerDummy = Character:Clone()
Character.Archivable = false
--
playerDummy.Archivable = true
playerDummy.Name = "Dummy"..Player.UserId
playerDummy.Parent = workspace
playerDummy:WaitForChild("Humanoid").DisplayName = " "
RunService.Heartbeat:Wait()

--
local dummyPosition = CFrame.new( dummyData.position)
local dummyOrientation = CFrame.Angles(
    math.rad( dummyData.orientation.X),
    math.rad( dummyData.orientation.Y),
    math.rad( dummyData.orientation.Z)
)
playerDummy:SetPrimaryPartCFrame( dummyPosition *dummyOrientation )


------------------------------------------------------------------
for _, part in ipairs(playerDummy:GetChildren()) do 
    --
    if part:IsA('MeshPart') then
        --
        for _,instance in ipairs(part:GetChildren()) do
            --
            if instance:IsA("Motor6D") then
                --
                if dummyData[instance.Name] then
                   
                    instance.C0 = dummyData[instance.Name][1]
                    instance.C1 = dummyData[instance.Name][2]
                end
            end
        end
    end
end

I don’t know if this is the best approach, but it works as expected on localscript.

thank you @2DGrlsCantBr8kHearts and @Dev_Breezy

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.