Scriptable Camera won't follow character after morph

Hi all,

I finally got my morph correct and it finally spawns my character customization morph, but the camera won’t follow my character after morph. I’ve read multiple dev posts about changing the cameratype to “Fixed” solves their issue, but I’m using a custom “top-down” cam and it cannot be fixed type. It has to be “Scriptable” My code:

local player = game:GetService("Players").LocalPlayer
local runService = game:GetService("RunService")
local repStorage = game.ReplicatedStorage
local Player = game:GetService("Players")
local Camera = game:GetService("Workspace").CurrentCamera
local Mouse = player:GetMouse()
local fDummy = game.Workspace.StarterFemale
local mDummy = game.Workspace.StarterMale
local CurrentZoomX = 30
local CurrentZoomY = 40
local CurrentZoomZ = 15
local bp = Instance.new("BodyPosition")
local cameraPart = Instance.new("Part")
local char = script.Parent
local hrp = char:WaitForChild("HumanoidRootPart")

function zoomCam()
	local char = script.Parent
	local hrp = char:WaitForChild("HumanoidRootPart")
	local cameraPos = hrp.Position + Vector3.new(30, 40, 15)
	print("Beginning top down cam process")
	Camera.CameraType = Enum.CameraType.Scriptable
	print("Camera type is set")
	Camera.CameraSubject = player.Character.Humanoid
	
	cameraPart.Transparency = 1
	cameraPart.CanCollide = false
	cameraPart.Parent = workspace
	cameraPart.Name = "cameraPart1"
	cameraPart.CFrame = CFrame.new(hrp.Position + Vector3.new(30, 40, 15), hrp.Position)
	print("Top down cam created")
	
	bp.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
	bp.Parent = cameraPart
end

game.StarterPlayer.CameraMaxZoomDistance = 60

game.StarterPlayer.CameraMinZoomDistance = 20
	
while true do
		if player.creationcustomInt.ccustInt.Value < 1 then
		wait(.5)
		print("Value not yet 1")
		else
		print("Proceeding with top down cam")
		break
	end
end


zoomCam()
print("zoom cam applied.")

Mouse.WheelBackward:Connect(function()
	local char = script.Parent
	local hrp = char:WaitForChild("HumanoidRootPart")
	local cameraPos = hrp.Position + Vector3.new(30, 40, 15)
	if CurrentZoomY == game.StarterPlayer.CameraMaxZoomDistance then return end
	CurrentZoomY = CurrentZoomY + 2
	CurrentZoomX = CurrentZoomX + 1.5
	CurrentZoomZ = CurrentZoomZ + .75
	cameraPos = Vector3.new(CurrentZoomX, CurrentZoomY, CurrentZoomZ)
	if CurrentZoomY > game.StarterPlayer.CameraMaxZoomDistance then
		cameraPos = Vector3.new(45, game.StarterPlayer.CameraMaxZoomDistance, 22.5)
	end
end)

Mouse.WheelForward:Connect(function()
	local char = script.Parent
	local hrp = char:WaitForChild("HumanoidRootPart")
	local cameraPos = hrp.Position + Vector3.new(30, 40, 15)
	if CurrentZoomY == game.StarterPlayer.CameraMinZoomDistance then return end
	CurrentZoomY = CurrentZoomY - 2
	CurrentZoomX = CurrentZoomX - 1.5
	CurrentZoomZ = CurrentZoomZ - .75
	
	cameraPos = Vector3.new(CurrentZoomX, CurrentZoomY, CurrentZoomZ)
	if CurrentZoomY > game.StarterPlayer.CameraMinZoomDistance then
		cameraPos = Vector3.new(15, game.StarterPlayer.CameraMinZoomDistance, 7.5)
	end
end)

runService.RenderStepped:Connect(function()
	bp.Position = hrp.Position + Vector3.new(CurrentZoomX, CurrentZoomY, CurrentZoomZ)
	Camera.CFrame = cameraPart.CFrame
end)

the function after the var’s being defined is my top down cam, “zoomCam()”. The while loop waits for my character customization to enter an IntValue of 1 for ccustInt to tell this top down camera is ready to be applied. So a character gets customized, hits OK, gets morphed, changes the ccustInt to 1, the zoomcam sees it and applies. But it doesnt follow the morph afterward. Is there a quick fix?

Thanks in advance…

Should be noted that if i don’t morph this works perfectly. post morph the cam part position works fine and looks down on my char, but the mouse wheelp up/down zoom in/out functions don’t work and the renderstepped don’t work.

Update:

I’ve abandoned this method. Just used StarterCharacter method instead and added like a million remote events. Works, so it’s all the same to me.