Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local TweenService = game:GetService("TweenService")
- local Camera = game.Workspace.CurrentCamera
- local function MoveCamera(StartPart, EndPart, Duration, EasingStyle, EasingDirection)
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = StartPart.CFrame
- local Cutscene = TweenService:Create(Camera, TweenInfo.new(Duration, EasingStyle, EasingDirection), {CFrame = EndPart.CFrame})
- Cutscene:Play()
- wait(Duration)
- end
- local function Cutscene()
- MoveCamera(workspace.Cutscenes.CameraA, workspace.Cutscenes.CameraB, 5 , Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
- wait(.5)
- Camera.CameraType = Enum.CameraType.Custom
- Camera.CameraSubject = game.Players.LocalPlayer.Character:WaitForChild("Humanoid")
- end
- game.ReplicatedStorage.CutscenesEvent.Cutscene.OnClientEvent:Connect(function()
- Cutscene()
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement