A thing very common in roblox, in fact there are more deaths than kills. Many of you have noticed that the default death style is: the limbs fall off and you restart; the camera view is always third person, in this tutorial, I'm going to show you how to create a first person death. Now, the state of level for this tutorial is easy, because there isn't much to it.
- Localscript usage
- Character/Head/Humanoid application
- Camera application
- RunService/RenderStepped application
local player = game.Players.LocalPlayer local character = player.Character character:WaitForChild("Humanoid") local hum = character.Humanoid local head = character.Head local camera = workspace.CurrentCamera local rs = game:GetService("RunService").RenderStepped hum.Died:connect(function() rs:connect(function() camera.CFrame = head.CFrame end) end)
recommendation: This works really well with rag-doll deaths.
edit: Localscript can be located in either StarterGui or StarterGear