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)