How Can I Rotate A Humanoid Character into a Gui (Viewport Frame)?

Hello, I don’t know how to rotate humanoid character in a gui?
My script:

local root = plrChr.HumanoidRootPart
local ts = game:GetService("TweenService")
root.Anchored = true
for _,obj in pairs(plrChr:GetChildren()) do
	if obj.Name == "HumanoidRootPart" then
	else
		if obj:IsA("BasePart") then
			local weld = Instance.new("WeldConstraint",plrChr)
			weld.Part0 = root
			weld.Part1 = obj
			obj.Anchored = false
		end
	end
end
y = 3
while true do
	ts:Create(root,TweenInfo.new(0.1,Enum.EasingStyle.Linear),{CFrame = CFrame.Angles(0,math.rad(y),0)}):Play()
	wait(0.1)
	y += 3
end

ViewportFrames do not respect BasePart.Anchored. Instead, remove that welding for loop and stop using TweenService. Next, in the while loop you made, you can use your remaining code to do this:

while true do
	plrChr:SetPrimaryPartCFrame(CFrame.Angles(0,math.rad(y),0))
	wait(0.1)
	y += 3
end

and this should work perfectly fine, if your model has a PrimaryPart set.

1 Like

Thank you The Character Player move correctly