i want that when a player dies, they can't move the camera until they respawn again thanks
COMMUNITY QUESTION
how can i freeze player's camera when he dies?
1 answer
insert a localscript in startergui and do like:
local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local cam = workspace.CurrentCamera -- Gets the camera
char.Humanoid.Died:Connect(function()
--Locks camera when everytime character dies
cam.CameraType = Enum.CameraType.Scriptable
end)
plr.CharacterAdded:Connect(function()
--Unlocks camera everytime when character spawns
cam.CameraType = Enum.CameraType.Custom
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
I'm pretty sure Enum.CameraType.Fixed instead of Enum.CameraType.Scriptable also works