Since you’re being pretty vague, I’ll just give you the base for moving the camera dependently from the player.
Has to be in a local script by the way.
local Camera = game.Workspace.CurrentCamera
local CameraPosition = Vector3.new(0,0,0) -- don't know
local LookAt = Vector3.new(0,1,0) -- don't know
Camera.CameraType = Enum.CameraType.Scriptable
Camera.CFrame = CFrame.new(CameraPosition,LookAt)
-- ^^ the cframe is the position AND rotation of the camera
Create a Local Script inside the Button and place this script:
local Camera = workspace.CurrentCamera
local Player = game:GetService("Players").LocalPlayer
local Character = Player.Character
script.Parent.MouseButton1Click:Connect(function()
Camera.CameraType = Enum.CameraType.Scriptable
local Position = Vector3.new(0, 20, 20) --Position you want
while task.wait() do
Camera.CFrame = CFrame.lookAt(Position, Character.PrimaryPart.Position)
end
end)