So I'm making a require script, and it seems that when I change the player.Character property, the CameraSubject of workspace.CurrentCamera doesn't change with it, so the camera never moves. Could anyone help? Here is my script that gets cloned to the character:
local Player
ParentIsPlayer = pcall(function() Player = game.Players[script.Parent.Name] end)
local NewCharacter = script.char
if ParentIsPlayer == true then
print("playerisparent")
local OldCharacter = Player.Character or Player.CharacterAdded:Wait()
local OldPos = OldCharacter:GetPrimaryPartCFrame()
NewCharacter.Name = Player.Name
NewCharacter.Parent = workspace
Player.Character = NewCharacter
NewCharacter:SetPrimaryPartCFrame(OldPos)
else
print("playerisnotparent")
end

4 comments
workspace.CurrentCamera.CameraSubject = NewCharacter.Humanoid
nope this is a SERVER script.
If this is a server script, then keep in mind that CurrentCamera is a property set only on the local side. On the server, CurrentCamera is always nil.
I tried setting up a remote event but the client never responds :/