How would i create a top down camera that can move only on the X and Z axis?

Not sure what to do to create this

i just some information on how to create a top down camera that can only be moved on the X and Z axis with right click

I’ll try to make it real quick and I’ll send you the script.

something like this?

wait(3)
local RunService = game:GetService("RunService")

local Camera = workspace.CurrentCamera

local player = game:GetService("Players").LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()

Camera.CameraType = Enum.CameraType.Scriptable


RunService.Heartbeat:Connect(function()
	Camera.CFrame = CFrame.new(character:WaitForChild("HumanoidRootPart").Position) + Vector3.new(0,25,0)
	Camera.CFrame *= CFrame.Angles(math.rad(-90),0,0)
end)

kinda, although i kinda need it to be semi free roam with the camera as ill have the players off the map