PivotTo isnt changing CFrame

the player is being teleported but the orientation isnt correct to the block

game.Players.LocalPlayer.Character:PivotTo(game.Workspace.CharacterSpawn.CFrame)

i was testing its due to when the round ends if they are in 1st person there orientation is set to where the player is facing

Not First Person:

First Person:

Problem is that while in first person your character will always look forward, so you will have to force the player out of first person to be able to rotate them to look at the camera. You can do it by simply setting CameraMinZoomDistance to a number higher than 0.5 when you are changing the camera mode.

what about shift lock? (i want to be able to enable it when in round and disable it after round)

probably primary part is not HumanoidRootPart

mile fixed it, just that now in shiftlock beaks it

then try to anchor torso before character teleport

The problem with shift lock is that option to disable shift lock with scripts has been deprecated, and I currently dont know a workaround for that. If I find a way to do it I will post it here.

yea i did search it up but it got deprecated so im not sure how to do it anymore

For now it seems that there is no way of disabling it during gameplay unfortunately. Best way I believe is to just make a custom shift lock, I found this post:

Ive modified it a bit and made it into a module so its easier to use:

Module Script in Replicated Storage:

local CustomShiftLock = {}

local player = game:GetService("Players").LocalPlayer
local camera = game:GetService("Workspace").CurrentCamera
local runService = game:GetService("RunService")
local uis = game:GetService("UserInputService")

local character = player.Character or player.CharacterAdded:Wait()
local rootPart = character:WaitForChild("HumanoidRootPart")
local humanoid = character:WaitForChild("Humanoid")

local shiftlock = false
local disabled = false

local function shiftLock(toggle)
	
	shiftlock = toggle

	local function lock()
		local lookVector = camera.CFrame.LookVector
		local rootPos = rootPart.Position 
		local distance = 900

		rootPart.CFrame = CFrame.new(rootPos, lookVector * Vector3.new(1, 0, 1) * distance)
	end

	if toggle then
		runService:BindToRenderStep("ShiftLock", 200, lock)

		humanoid.CameraOffset = Vector3.new(1.8,0,0)
	else
		runService:UnbindFromRenderStep("ShiftLock")

		humanoid.CameraOffset = Vector3.new(0,0,0)
	end

	humanoid.AutoRotate = not toggle
	uis.MouseBehavior = toggle and 1 or 0

end

player.CharacterAdded:Connect(function(char)
	rootPart = char:WaitForChild("HumanoidRootPart")
	humanoid = char:WaitForChild("Humanoid")
	if not disabled and shiftlock then
		shiftLock(true)
	end
end)

function CustomShiftLock.enable(toggle)
	if disabled then return end
	
	shiftLock(toggle and toggle or not shiftlock)
end

function CustomShiftLock.disable(val)
	disabled = val and true or false
	if disabled then
		shiftLock(false)
	end
end

return CustomShiftLock

Local Script inside StarterGui (It can be placed in PlayerScripts or CharacterScripts)

local uis = game:GetService("UserInputService")
local shiftlock = require(game:GetService("ReplicatedStorage"):WaitForChild("CustomShiftLock"))

uis.InputBegan:Connect(function(input,processed)
	if processed then return end
	
	if input.KeyCode == Enum.KeyCode.LeftShift then
		shiftlock.enable()
	end
end)

And to disable the shift lock (and it wont be able to be turned on until you enable it again) just do:

shiftlock.disable(true) -- to disable
shiftlock.disable(false) -- to enable

Its not perfect as it will look a bit choppy when you turn fast, but I dont think there is a way to fix that (you could remove CameraOffset to make it look smooth, but then camera will be in the middle rather than on the side)

To temporarily disable Shift Lock there is a property in the Humanoid called AutoRotate that you can set to false.

Humanoid.AutoRotate = false

This also stops the character rotating in first-person as well.

I encountered this problem myself, and the easy fix for me is to do (Apparently it doesn’t work lol nvm)

char.PrimaryPart.CFrame = cf

instead of

char:PivotTo(cf)

in your case, it would be written like so:

game.Players.LocalPlayer.Character.PrimaryPart.CFrame = workspace.CharacterSpawn.CFrame