cam = game.Workspace.CurrentCamera pos = Vector3.new(0,20,0) -- Rise Camera Upwards 20 studs from origin lookAt = Vector3.new(0,10,0) -- Orient the cam 10 upwards from origin
cam.CFrame = CFrame.new(pos) * CFrame.Angles(lookAt)
When I do this the camera stops following me and stays where it is, how can I move it to a new pos while keeping it followed on me??!!! Please!
I've already made it scriptable, but it works but it doesn't work the way I want it to...
Scriptable camera does not move automatically, you'd have to update its position and orientation every frame. Before you do that, check out other camera types, to make sure none of them are what you are looking for:
If none of them are to your liking, you'd have to connect your camera function to RenderStepped(). Why not wait() loop or Heartbeat()? Because RenderStepped will execute, before rendering and it is recommended for (and only) camera manipulation. Below LocalScript will create overhead camera.
cam = game.Workspace.CurrentCamera cam.CameraType = Enum.CameraType.Scriptable cam.CameraSubject = workspace local RunService = game:GetService("RunService") local Players = game:getService("Players") local character = Players.LocalPlayer.character or player.CharacterAdded:wait() local root = character:WaitForChild("HumanoidRootPart") local riseVector = Vector3.new(0,20,0) local function onRenderStep() cam.CFrame = CFrame.new(root.Position + riseVector,root.Position) end RunService.RenderStepped:Connect(onRenderStep)
just use
cam.CFrame = CFrame.new(pos, lookAt)
make sure make camera Scriptable or else it will reset back to the character in the script CFrame.Angles is used to rotate the camera/part anyways CFrame.new() is like all in one, position, look at it, and etc. and then don't forget return the camera into Custom again by adding some wait(NUMBER)