Hello, I have a problem with the positioning of the R15 dummy in the viewport frame.
It is designed to replicate the humanoid description (e.g. accessories and appearance). I figured out that in order to attach accessories to the dummy, you have to first parent it to the workspace, apply the description and parent it back to the viewport frame. But the problem is that it always rotates in a weird way.
I have tried everything, but nothing has worked. I would be glad if you could help me find the problem. Here is my code with my attempts to fix it:
local function ApplyNewDesc(username, template:Model)
local UserId = game.Players:FindFirstChild(username).UserId
local HumanoidDescription
local success,err = pcall(function()
HumanoidDescription = game.Players:GetHumanoidDescriptionFromUserId(UserId)
end)
if success then
local PrevLocation = template.Parent
template.Parent = workspace
template.PrimaryPart.CFrame = CFrame.new(Vector3.new(0, 0, 0))
print(template:GetPivot())
template.Humanoid:ApplyDescription(HumanoidDescription)
task.wait(0.1)
template.Parent = PrevLocation
template.PrimaryPart.CFrame = CFrame.new(Vector3.new(0, 0, 0))
else
task.wait()
ApplyNewDesc(username, template)
end
end
