Teleportation with camera manipulation?

Hello! I am making a part in my game where a cutscene is finished and the players camera is set back to custom and then teleported to an object, there is one problem. The player moves uncontrollably and will just spin out of the world. I am unable to find out why other than the fact that it only happens when I teleport the player.

Code:

game.Players.LocalPlayer.Character.HumanoidRootPart.Position = game.Workspace.MovePart3.Position
camera.CameraType = Enum.CameraType.Custom

Thank you for reading!

1 Like

try setting the hRoot position, using CFrame instead, CFrame is much more reliable!

(from personal experiences)

2 Likes
local player = game.Players.LocalPlayer
local char = player.Character or player.Character:Wait()
local hRoot = char.HumanoidRootPart
local movePart3 = --MovePart3 Here
hRoot.CFrame = CFrame.new(movePart3.CFrame)
2 Likes

game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = game.Workspace.MovePart3.CFrame

1 Like

This worked, thank you! I can’t believe it was this simple :laughing: