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

Interpolate not working in Studio?

Asked by 8 years ago

I've been re-introducing myself to camera manipulation and I can't perform the simplest of tasks for some reason. All I want to do is interpolate the camera to a point and it's not doing anything. Focus also doesn't work. The event that the call is in does fire (I've confirmed this with output printing), but the Interpolate call itself doesn't work. The code I have so far is as follows:

cam = workspace.CurrentCamera
staff = workspace.Song.Staff
debounce = false

script.Parent.Torso.Touched:connect(function(hit)
    if not debounce and hit.Name == "Starter" then debounce = true
        cam.CameraType = "Scriptable"
        cam:Interpolate(staff.CFrame, staff.CFrame, 10)
        game.Players.LocalPlayer.PlayerGui.ScreenGui.Songmaker.Visible = true
    end
end)

1 answer

Log in to vote
1
Answered by 8 years ago

Studio and camera interpolation do not mix, if you run the script in-game instead of in studio it should work. Also camera type should be Enum.CameraType.Scriptable.

Ad

Answer this question