HI,
I need to move with player camera (i exactly dont know, but i think that in jail break when i join, the camera is moving there in front of bank,…), i tried using view port frames, but best result was this
This will move the camera from Position 1,2,3 to 5,6,7 in 2 seconds.
If you don’t know how to get the CFrames you want you can get your Studio’s Camera CFrames.
Type this in the command line
print(workspace.Camera.CFrame.p)
This will give you your camera’s current position, so you could get both CFrames for the Interpolate function easily. You can tweak them from here I guess.
Also, instead of Interpolate, you can use Tweening, but Interpolate() does the job for the most part and is much easier to do.
Sorry if I got your intent completely wrong though :V
Setting a CFrame of anything both sets it’s position AND rotation.
If you want to make the camera look at a specific position, or a part for example, you can do
_G.First = false
local m = game.Players.LocalPlayer:GetMouse()
m.KeyDown:Connect(function(k)
if k == "k" --key make it uncaps
if _G.First == true then
_G.First == false
else
_G.First == true
end
end)
local runservice = game:GetService("RunService")
runservice.RenderStepped:Connect(function()
pcall(function()
if _G.First == false then
workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable
workspace.CurrentCamera.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame.p * CFrame.new(0,0,10) -- or CFrame.new(10,0,0)
*CFrame.Angles(0,0,1.5)
else
workspace.CurrentCamera.CameraType = Enum.CameraType.Custom
end)
end)