Character looking where camera looks

So basically what the situation is i made a door when you press E a cutscene like meepcity starts showing you yourself entering the door and coming out from the other side. The problem is when you zoom all the way in roblox makes your character look at where your camera looks. So when i make the camera mode scriptable the character orientation stucks at the old orientation. When i use moveTo() it walks backwards.

Its a bit confusing but i hope i made it clear.

rotate and position the character with model:PivotTo(PivotCFrame).

example:

door.doorOpened:Connect(function()
   character:PivotTo(DoorPivotPoint)
end)

or change the starterplayer minZoomDistance and then rotate

Would the current zoom change if i change the minimum zoom distance?

There may be many ways to fix this, but the simplest one that would work with what you’re doing is to control the view for the cutscene.

This is one of my favorite scripts, use it all the time. This is the basic set up.

Zoom
local player: Player = game:GetService("Players").LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
--local paws=character:WaitForChild("HumanoidRootPart")task.wait(1.2)
--only need that line if this is used when starting the program

--====
local min = 5
local max = 5
local set = 5
--====
function setZoom(set)
	player.CameraMinZoomDistance=set
	player.CameraMaxZoomDistance=set task.wait(0.1)
	player.CameraMinZoomDistance=min
	player.CameraMaxZoomDistance=max
end

setZoom(set)

So you are changing the minimumZoomDistance to zoom out the camera?

5,5,5 would lock it right at 5, no zoom possible after that (that may be a bit close).
Say you set it to 0,9,5 at the start of the program. When you run the cutscene, set it to 5,5,5 or whatever works for you. After the cutscene, set it back to 0,9,5, making sure the last 5 (set) lines up with where you locked the zoom. To them it just wouldn’t zoom during the cutscene…

Set is putting the zoom where you want it to be, then Min and Max define what zoom is possible.
It looks a bit odd, but it actually works well, sure took a bit to figure out how to do that. :rofl:

These two lines force the zoom to be set to it…

player.CameraMinZoomDistance=set
player.CameraMaxZoomDistance=set task.wait(0.1)

These two lines then define the zoom range…

player.CameraMinZoomDistance=min
player.CameraMaxZoomDistance=max

I tried

player.CameraMinZoomDistance = 5

but for some reason it doesnt work. I can just zoom all the way in for some reason.

Like I said, this took me a bit to figure out… It needs to be done as I wrote it. Even the wait() is needed. There is no way to set the zoom in real-time other than it’s range. By setting the min and max the same, it will set the the zoom the player is seeing in real-time. In this case I’m then locking the range to the same number, that = zoom locked where I want it to be.

Also this needs to be done from a LocalScript (Client Script).

You could use a ModuleScript for this too, I guess…

local mod = {}

function mod.Set(player, min, max, set)
	player.CameraMinZoomDistance = set
	player.CameraMaxZoomDistance = set ; task.wait(0.1)
	player.CameraMinZoomDistance = min
	player.CameraMaxZoomDistance = max
end

return mod

As long as it is called from a LocalScript.