Cant change Camera CFrame

I want to make a Jumpscare so the camera has to face the character that does the jumpscare

the problem is it doesnt change here is video:
robloxapp-20240414-1501104.wmv (1.5 MB)

I have tried to put a block instead of character’s head because it was made in blender

here is Code:

local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local playerdeath = game.ReplicatedStorage:WaitForChild("PlayerDeath")
local camera = workspace.CurrentCamera

local function deathEffect(newCharacter)
	camera.CameraType = Enum.CameraType.Scriptable
	camera.CFrame = newCharacter.Cube.CFrame
	camera.CameraSubject = newCharacter.Cube
end
playerdeath.OnClientEvent:Connect(deathEffect)
humanoid.Died:Connect(function()
end)

btw I’m a new dev

local function deathEffect(newCharacter)
	camera.CameraType = Enum.CameraType.Scriptable
	camera.CFrame = CFrame.new(camera.Position, newCharacter.Cube.Position)
	camera.CameraSubject = newCharacter.Cube
end

You’re setting the camera CFrame to face the direction that the cube is facing in your script.

CFrames pass the second argument as the Vector3 to face towards, not the orientation. (Well sorta the orientation but you get what I mean)

i figured out the problem right as i made this post and i totally forgot about it there was another script that changes the camera to be positioned in first person that i took from a video i disabled it and it worked i didnt need that script anyway because it didnt really work as i expected and it doesnt work for mobile users