--[[
	When the character exists, connect their humanoid dying so that they leave camera state
]]

local function onCharacterAdded(stateMachine, player, character)
	local humanoid = character.Humanoid

	humanoid.WalkSpeed = 0

	humanoid.Died:Connect(
		function()
			player:LoadCharacter()
			stateMachine:endCamera()
		end
	)
end

local PlayerCamera = {}
