Camera does not rotate when setting CFrame

i made a checkpoint system and it works fine altho when im setting the character CFrame after the player has died it does not rotate the camera with it

here is a video of this https://gyazo.com/3e6c75dff12b8af2cdda7a76b81ebace

here is my checkpoint system

game.Players.PlayerAdded:Connect(function(player)
	local leaderstats = Instance.new("Folder")
	leaderstats.Name = "leaderstats"
	leaderstats.Parent = player
	
	local Stage = Instance.new("IntValue")
	Stage.Parent = leaderstats
	Stage.Value = 1
	Stage.Name = "Stage"
	
	player.CharacterAdded:Connect(function(character)
		wait()
		character.HumanoidRootPart.CFrame = workspace.Checkpoints:FindFirstChild(tostring(Stage.Value)).CFrame * CFrame.new(0,3,0)
	end)
end)

for i,v in pairs(workspace.Checkpoints:GetChildren()) do
	v.Touched:Connect(function(hit)
		if hit.Parent:IsA("Model") and hit.Parent:FindFirstChild("Humanoid") then
			local player = game.Players:GetPlayerFromCharacter(hit.Parent)
			if player then
				if v.Name == tostring(player.leaderstats:WaitForChild("Stage").Value + 1) then
					v.Color = Color3.new(0, 1, 1)
					player.leaderstats.Stage.Value += 1
				end
			end
		end
	end)
end

thanks if you can try helping me

I don’t really understand what the issue is, it seems to work fine in the video.

What are you trying to do here??

It looks fine I agree with sharper. What’s the problem?

the camera is not behind the player, that is the problem…

This is not an issue, simply rotate your camera and it’ll work just fine.

how can i rotate it tho? with a remote event?

Why a remote event? Just change the camera property to be behind the player.

but i need a local script for that, and which camera property i need to change?

I agree with @Syclya fire a remote event to client when character respawns to rotate camera, seems like rotating it by 90 degrees would work fine

local camera = workspace.CurrentCamera

RemoteEvent.OnClientEvent:Connect(function()
    camera.CFrame *= CFrame.Angles(math.rad(90),0,0)
end)

I’m not sure if x axis is correct axis to rotate but if it’s not just mess around with it

nope this is not working… even if i change the x

Do you get any errors by any chance?

nope, if i will i would say… :confused:

Did you try changing CameraType to scriptable or something?

yes i now tried does not work (30

May i see your script? I want to see if something is wrong

k

local player = game.Players.LocalPlayer
local camera = workspace.CurrentCamera
game.ReplicatedStorage.RotateCamera.OnClientEvent:Connect(function()
	camera.CameraType = Enum.CameraType.Scriptable
	camera.CFrame *= CFrame.Angles(math.rad(90),0,0)
	camera.CameraType = Enum.CameraType.Custom
end)

this is the local script
its putting the camera below the player

So it rotates camera now but in wrong axis? If so change the axis

still, it will be at the same place thats not solving the issue, it will still be what it is in the video