so my camera look like this now
https://gyazo.com/cd1a74049edab9d9ff8730ada42d7a53
but i want it to look like this
https://gyazo.com/3cb541b435a280aba0c0b125eb35f21d
and then this is my script
local player = game.Players.LocalPlayer
local char = player.CharacterAdded:Wait()
local cam = game.Workspace.CurrentCamera
local RunService = game:GetService("RunService")
local replicateRemote = game.ReplicatedStorage:WaitForChild("Replicate")
replicateRemote.OnClientEvent:Connect(function()
local CinematicsFolder = script.Cutscene_Camera
local CurrentCameraCFrame = workspace.CurrentCamera.CFrame
cam.CameraType = Enum.CameraType.Scriptable
local FrameTime = 0
local Connection
Connection = RunService.RenderStepped:Connect(function(DT)
local NewDT = DT * 30
FrameTime += NewDT
local NeededFrame = CinematicsFolder.Frames:FindFirstChild(tonumber(math.ceil(FrameTime)))
if NeededFrame then
char.Humanoid.AutoRotate = false
cam.CFrame = char.HumanoidRootPart.CFrame * NeededFrame.Value
else
Connection:Disconnect()
char.Humanoid.AutoRotate = true
cam.CameraType = Enum.CameraType.Custom
cam.CFrame = CurrentCameraCFrame
end
end)
end)