Menu not changing to player CFrame #2

I made a post about this already but I have to make another as it was becoming a thread and I have already rewritten some of the code to no avail.

Yes, it is in StarterGui. It is a local script.
I revised the code by destroying the current camera, when done manually works and does work in the code, but does not then change the camera subject and type
I tried adding a wait to it so it would not change it before or while it is being :Destroy(d) but that does not work.

PlayButton.MouseButton1Click:Connect(function()
	PlayButton.Visible = false
	game.Workspace.CurrentCamera:Destroy()
	task.wait(0.1)
repeat task.wait ()
		Camera.CameraType = Enum.CameraType.Custom
	until Camera.CameraType == Enum.CameraType.Custom
	Camera.CameraSubject = Humanoid
	Camera.CameraType = Enum.CameraType.Custom
	Camera.CFrame = Char.Head.CFrame
end)
  1. There is a script in StarterPlayer that is changing the camera to scriptable, one time , and there is a Menu Mouse / Camera Movement code that doesn’t really affect it and when manually I delete the camera and then change it to Custom, and subject to Humanoid it works. (which is what I am attempting in this code)

try this:

local Camera = workspace.CurrentCamera
local camtype = Enum.CameraType.Fixed 
PlayButton.MouseButton1Click:Connect(function()
	PlayButton.Visible = false
	game.Workspace.CurrentCamera:Destroy()
	task.wait(0.1)
task.wait()
	Camera.CameraSubject = Humanoid
Camera.CameraType = camtype
end)

So, what are you trying to make when the PlayButton gets clicked? Are you trying to make First Person (Zoomed completely into the head). If that is the case. Then try this.

PlayButton.MouseButton1Click:Connect(function()
	PlayButton.Visible = false
	repeat task.wait ()
		Camera.CameraType = Enum.CameraType.Custom
	until Camera.CameraType == Enum.CameraType.Custom
	Camera.CameraSubject = Humanoid
	game:GetService("Players").LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson --That is how you activate zooming into the head
end)