Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Camera isn't attached to where it should be?

first of all, i'm a novice scripter. kinda don't know what i'm doing. this script used to work, but now the camera doesn't focus where i want to. i think the script still attaches the camera to the part, but it's really zoomed out and doesn't work at all.

local cam = game.Workspace.CurrentCamera
local part = game.Workspace:WaitForChild("FocusHere")

cam.CameraSubject = part
wait(1)
cam.CoordinateFrame = CFrame.new(part.Position + Vector3.new(1,0,1))
cam.CameraType = 'Attach'

1 answer

local cam = game.Workspace.CurrentCamera
local part = game.Workspace:WaitForChild("FocusHere")

   local target = part
local cam = workspace.CurrentCamera
cam.CameraType = 'Attach'
cam.CameraSubject = target

cam.CoordinateFrame = CFrame.new(target.Position + Vector3.new(1,0,1))

Try using this

1 comment

0

didn't work, unfortunately.

This discussion is preserved as it was. New answers, comments, and votes are closed.