Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Camera isn't attached to where it should be?

Asked by
Stravan 18
6 years ago

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

Log in to vote
0
Answered by
Prestory 1395 Moderation Voter
6 years ago
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

0
didn't work, unfortunately. Stravan 18 — 6y
Ad

Answer this question