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

Camera Interpolate not working?

I'm trying to tween the camera between two points: target1 and target2 I found out about Interpolation on the wiki but I can't seem to get it to work, what am I doing wrong?

local target1 = workspace.StandOffTarget1
local target2 = workspace.StandOffTarget2
local camera = workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Scriptable
camera.CameraSubject = target1

camera.CoordinateFrame = CFrame.new(target1.Position) * CFrame.Angles(0.5, 1.6, -0.5) * CFrame.new(3, 0, -10) 
camera:Interpolate(CFrame.new(target1.Position), CFrame.new(target2.Position), 5)

1 answer

✓ Accepted answer

e.e. firstly before anything I want you to place this into your command bar for some fun while I get the answer done at the bottom

for i = 99, 1, -1 do print( i .. " bottles of pop on the wall." ) wait(2) print( i .. " bottles of pop.") wait(3) print("Take one down, pass it around " .. i .. " bottles of pop on the wall.") wait(5) end

firstly instead of doing

local target1 = workspace.StandOffTarget1
local target2 = workspace.StandOffTarget2
local camera = workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Scriptable
camera.CameraSubject = target1

camera.CoordinateFrame = CFrame.new(target1.Position) * CFrame.Angles(0.5, 1.6, -0.5) * CFrame.new(3, 0, -10) 
camera:Interpolate(CFrame.new(target1.Position), CFrame.new(target2.Position), 5)

do

local target1 = workspace.StandOffTarget1
local target2 = workspace.StandOffTarget2
local camera = workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Scriptable
camera.CameraSubject = target1

camera.CoordinateFrame = CFrame.new(target1.Position) * CFrame.Angles(0.5, 1.6, -0.5) * CFrame.new(3, 0, -10) 
camera:Interpolate(target1.CFrame, target2.CFrame, 5)

secondly camera interlope doesn't really work in roblox studios. try it out in game mode and youll see, if you got the angles correct then it should be all fine Assuming that this is in a local script and you have done

local camera = workspace.CurrentCamera

.

2 comments

0

Thanks for that xdd

0

e.e. did it solve the problem?

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