Character dosent stand up when teleporting

how i can fix that?

local prompt = script.Parent

local teleportPart = game:GetService("Workspace"):WaitForChild("tpback"):WaitForChild("Part")


prompt.Triggered:Connect(function(player)
	local character = player.Character
	if character and character:FindFirstChild("HumanoidRootPart") then
		character:FindFirstChild("HumanoidRootPart").CFrame = teleportPart.CFrame + Vector3.new(0, 3, 0)
	end
end)
2 Likes

By using the teleportPart’s CFrame, you’ll also be affecting the HumanoidRootPart’s orientation, and it appears like the teleportPart is orientated in a way such that the HumanoidRootPart faces in the weird way as shown in the video. The code snippet below will use the Position value of teleportPart instead of the full CFrame - removing the orientation issue.

character:FindFirstChild("HumanoidRootPart").Position = teleportPart.CFrame.Position + Vector3.new(0, 3, 0)

3 Likes

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