Issue With Camera

Hey developers. I’m making an egg hatching system, where when you click on an egg dispenser, your camera is where the box that reveals your pet is. The egg then explodes and reveals your pet. After five seconds, the camera should look back to your character, but it doesn’t. Help appreciated, here’s my code.


local tween = TweenService:Create(camera, tweenInfo, {CFrame = CFrame.new(petClone.PrimaryPart.Positon + (petClone.PrimaryPart.CFrame.lookVector * 5) + Vector3.new(0,0.75,0),petClone.PrimaryPart.Position)  }  )
	
	tween:Play()
	
	wait(5)
	
	camera.CameraType = Enum.CameraType.Custom
	studio.Egg.Transparency = 0
	studio.Egg.Size = Vector3.new(3.653, 4.54, 3.053)
	petClone:Destroy()
	
	end)
2 Likes

Try adding
camera.CameraSubject = Players.LocalPlayer.Character.Humanoid