Unable to make players camera default instead of tied to objects CFrame

Hey there, I am unable to get my player’s camera to revert back from its current manipulation. (tied to an object in another script, when buttons are pressed)
Its because I can’t seem to get the correct humanoid or character.


--Variables and code for reserve server stuff
local MainMusic = game.SoundService["Distorted Reality Perception - Leon Riskin"]

local reserve = script.Parent.GameTypeButton1
local debounce = false
local ScreenGui = script.Parent.Parent
	if debounce then return end 
	debounce = true

	local ts = game:GetService("TeleportService")
	local access = ts:ReserveServer(game.PlaceId)
	ts:TeleportToPrivateServer(game.PlaceId, access, game.Players:GetPlayers())
	warn("Teleporting everybody...")

	debounce = false

local Players = game:GetService("Players")

local player = Players.LocalPlayer
local Character = player:WaitForChild("Character")
local Humanoid = Character:WaitForChild("Humanoid")

local Camera = workspace.CurrentCamera
local Players = game:GetService("Players")
local isReserved = game.PrivateServerId ~= "" and game.PrivateServerOwnerId == 0

if isReserved == true then
	print("reserved is true")
	ScreenGui.Enabled = false
	Camera.CameraType = Enum.CameraType.Custom
	Camera.CameraSubject = game.Players.Player.Humanoid
	MainMusic.Playing = false
1 Like

Players.Player doesnt exist, unless there is a player with the username “Player”.

Looking at this part here, this is a local script?
If it is, then why dont you just do Camera.CameraSubject = Character.Humanoid

Also, change your character line to this:
local Character = player.Character or player.CharactedAdded:Wait()