Unable to rotate HumanoidRootPart

Greetings, I have a problem, I can’t rotate the HumanoidRootPart. As you can see I am not facing the sink. I tried using CFrame.Angles but that didn’t work too. If you know any solutions for this problem it would be appreciated.

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local remoteEvent = ReplicatedStorage:WaitForChild("WashSink")

local Sink = script.Parent
local Clicker = Sink.ProximityPrompt
local WaterParticle = Sink.Water.liq
local SinkSound = Sink.Sound

local SinkEnabled = false

Clicker.Triggered:Connect(function(Player)
	local Pos = script.Parent.Teleport
	local character = game.Workspace[Player.Name]
	character.HumanoidRootPart.CFrame = CFrame.new(60, 5.302, -76.3)
	remoteEvent:FireClient(Player, Player.Name)
	if SinkEnabled == false and Clicker.Enabled == true then
		SinkEnabled = true
		Clicker.Enabled = false
		WaterParticle.Enabled = true
		spawn(function()
			if SinkEnabled == true then
				SinkSound.Volume = 10
				SinkSound:Play()
				while wait() do
					local canSetBack = false
					if canSetBack == false then
						if SinkSound.TimePosition >= 8 then
							canSetBack = true
							SinkSound.TimePosition = 2
							canSetBack = false
						end
					end
				end
			end
		end)
		wait(5)
		WaterParticle.Enabled = false
		SinkSound:Stop()
		SinkEnabled = false
		Clicker.Enabled = true
	end
end)
1 Like

Try turning the player’s archivable value to true, and make sure this is in a server script, not a local one.

It’s a server script (otherwise the remote event would not work) and player’s archivable value is true.

Try using,

character:WaitForChild("HumanoidRootPart").CFrame = CFrame.new(60, 5.302, -76.3)

or

character:FindFirstChild("HumanoidRootPart").CFrame = CFrame.new(60, 5.302, -76.3)

It teleports me but I don’t face the sink, is there a solution to fix that?

You could always try setting the CFrame of the humroot to a pre-determined / localized game object.

You can try CFrame.Angles

CFrame.new(60, 5.302, -76.3) * CFrame.Angles(0, math.pi, 0)

Try using cframe.lookat

hrp.CFrame = CFrame.lookAt(hrp.Position, sink.Position)
2 Likes

What is hrp? Did you mean humanoid or?

HumanoidRootPart inside character model.

HumanoidRootPart. Short form.

Lemme type some stuff so I can send this reply.

This really worked, thank you so much for help! :smiley:

1 Like