I work in some sort of tycoon and I need the camera in a custom position. How can I do it?
You should use
local camera = workspace.CurrentCamera local cframe = CFrame.new(0, 10, 0) camera.CFrame = cframe
It moves the camera to 0, 10, 0, but you can change it to whatever you like.
You should also look for info about CFrame.Angles to turn the camera where you want.
This method is known as the Cinema
method, wherever you place a brick, the Camera
will look in said direction. First, you want a LocalScript, reminder that the Camera
or CurrentCamera
can only be accessed through this type is Script. Put this in StarterPlayerScripts
.
Follow this example
local Cam = workspace.CurrentCamera --// This must be referenced as ‘CurrentCamera’. local CamPart = workspace:WaitForChild(“CamPart”) --// References to the Part to view from.
After referencing everything, we move to configuration.
Cam.CameraSubject = CamPart --// ‘CameraSubject’ is the part the Camera follows. Cam.CameraType = Enum.CameraType.Scriptable --// Scriptable makes the Camera freeze.
After configuring, we set the look direction
Can.CoordinateFrame = CFrame.new(position) --// Set’s a custom position from the CamPart. Cam.Focus = CFrame.new(direction) --// Set’s the direction of where Cam will look.
This is the end, just add everything together and you have a proper Camera Manipulation Script
Hope this helps, if so, press accept answer and upvote! Good Luck