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