What's the best way to TP a player then lock the character on an angle? !Help please!

I tried doing this but it seems to glitch the player out.

**local detector = script.Parent.ClickDetector

local Line = script.Parent

detector.MouseClick:Connect(function(player)

local nocontrol = game.Workspace[player.Name]:WaitForChild(“Freeze”)

local humanoid = game.Workspace[player.Name].Humanoid

local root = humanoid.Parent.HumanoidRootPart

root.Position = Vector3.new(Line.Position)

nocontrol.Disabled = false

end)**

You should change the CFrame of the root part, and not the position. It causes the root part to be detached from the character.

Oh, thank you!, and how could I turn the character angle and lock it well because anchor makes it stuck in an animation?

You could use CFrame.Angles, and then find the right angle that you want the character to be facing.

How should I lock? Sorry for asking too much, thank you for helping.

By locking do you mean so the character can’t move their camera or change the way they are facing? If so, the way I’ve done it before is changing the camera type to scriptable, and setting the characters walkspeed to 0. Of course, you would need to do the changing the camera type in a local script, which would require a remote event that calls FireClient

The character facing not the camera

Oh, so you want the character turned around, and the camera is looking at the character from the front…? Sorry for all the questions, I’m just trying to understand it better.

I don’t want to change anything with the camera, just lock the character to a certain angle.

If you’re saying you want the character to be frozen in place then try anchoring the character by getting character’s children then anchoring

use CFrame.Angles then get character’s children and then anchor them