CameraSubject REFUSES to update to new Humanoid whenever Player:LoadCharacter() is triggered

Heya, so i have made a custom death system for my W.I.P game, and simply put, that death system is client-sided and fires a RemoteEvent to the server, which then fires Player:LoadCharacter(). Once that happens, a CharacterAdded function is triggered in a client-sided script (located in StarterPlayerScripts) which sets the CameraSubject to the new Humanoid. Now, logically this should work, right? But, it just won’t for whatever reason. Whenever i check on the explorer, the CameraSubject is still the old Humanoid strangely enough.

local function CharacterAdded(NewCharacter: Model) --Sets everything back to normal when the player respawns.
    for _, Obj in Demo:GetDescendants() do
        if Obj:IsA("Model") then
            if Obj:GetAttribute("Reset") ~= nil then
                Obj:SetAttribute("Reset", true)
            end
        end
	end
	--------------------------------------
	local Humanoid = NewCharacter:WaitForChild("Humanoid")
	--------------------------------------
	Camera.CameraType = Enum.CameraType.Custom
	Camera.CameraSubject = Humanoid
end
--------------------------------------
Player.CharacterAdded:Connect(CharacterAdded)

Where is the localscript thats handling the camerasubject located? Is it potentially in the StarterCharacterScripts or Starterpack or maybe even in a StarterGUI that resets on death? If yes, move it to StarterPlayerScripts.

Otherwise the script would simply always be deleted together with the character, therefore the character added event would never be called as the script gets deleted before the next character is created.

Maybe that helps.

2 Likes

Hey, i have checked and yes the script is in StarterPlayerScripts, the bug is still occuring tho.