When u reset with the command the camera gets bugged

so i have a menu in this game, which the camera is in a part, and when u click play the camera return on the player, (in the head).
but when i reset with a command “xre” that stand for reset, it reset the character and camera stay where the player got reseted.
how can i fix it?

probably this

local cam = workspace.CurrentCamera

function resetCam()
      cam.CFrame = CFrame.new()
      cam.CameraType = Enum.CameraType.Custom
end

Can you send the camera script in question so we have a better idea of what you’re talking about?