Camera Manipulation - How to make a camera rotate around a part?

Alright, so I am working on a basic start menu, and I want the background to be rotating around the character until they click “Join,” or something like that in the UI. I have a part where their head will be, but how do I make it rotate around them until they click the UI button?

I can make it teleport them to spawn, but I don’t know how to make it rotate beyond this basic script I have under the part that I got from here

Script & Part Hierarchy
local RunService = game:GetService("RunService")

local target = script.Parent.Parent  -- The object to rotate around
local camera = workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Scriptable
local rotationAngle ="NumberValue")
local tweenComplete = false

local cameraOffset =, 10, 12)
local rotationTime = 15  -- Time in seconds
local rotationDegrees = 360
local rotationRepeatCount = -1  -- Use -1 for infinite repeats
local lookAtTarget = true  -- Whether the camera tilts to point directly at the target

local function updateCamera()
	if not target then return end
	camera.Focus = target.CFrame
	local rotatedCFrame = CFrame.Angles(0, math.rad(rotationAngle.Value), 0)
	rotatedCFrame = * rotatedCFrame
	camera.CFrame = rotatedCFrame:ToWorldSpace(
	if lookAtTarget == true then
		camera.CFrame =, target.Position)

-- Set up and start rotation tween
local tweenInfo =, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, rotationRepeatCount)
local tween = TweenService:Create(rotationAngle, tweenInfo, {Value=rotationDegrees})
	tweenComplete = true

-- Update camera position while tween runs
	if tweenComplete == false then