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)