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

Camera turn with interpolation to an brick?

Hello, i need an script that will turn your camera until a brick, like this:

<-- (camera) O (brick) \ O | O / O --> O


| O / O --> O

Etc

I need it for my fixed version slender model :P

I already tried to script, but it's only turning, won't stop.

I'll take some time to test your help, because my Roblox Studio is saying that my OpenGL aren't updated, but it is.

1 answer

The function you're looking for is Camera:Interpolate, wich makes your camera move smoothly between its current position and a CFrame you provide. Here is an example script :

Camera = game.Workspace.CurrentCamera
Camera.CameraType = "Scriptable"
Camera.Focus = game.Workspace.Part.CFrame
Camera.CoordinateFrame = CFrame.new(game.Workspace.Part.Position + Vector3.new(5, 5, 0), game.Workspace.Part.Position)
Camera:Interpolate(CFrame.new(game.Workspace.Part.Position + Vector3.new(-5, 5, 0), game.Workspace.Part.Position), game.Workspace.Part.CFrame, 3)

2 comments

0

Ok, when my Roblox Studio bug end, i'll test it ;)

0

I'll give you credit

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