You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
check video
What is the issue? Include screenshots / videos if possible!
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Fix please! Thanks For reading
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
-- This is an example Lua code block
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.
As far as I can see, you can set the .CameraType property back to Custom when your LocalScript detects that the character’s Humanoid dies. Something like:
local plr = game:GetService(“Players”).LocalPlayer
local plrCamera = workspace.CurrentCamera
-- other code here…
plr.CharacterAdded:Connect(function(character)
local humanoid = character:WaitForChild(“Humanoid”)
if humanoid and humanoid:IsA(“Humanoid”) then
humanoid.Died:Connect(function()
plrCamera.CameraType = Enum.CameraType.Custom
end)
end
end)
Since the player’s character gets destroyed, we’ll connect this specific piece of code to the LocalPlayer’s CharacterAdded event, so we can always find the LocalPlayer’s newest humanoid and connect the .Died event to setting the player’s CurrentCamera’s CameraType back to the default.