Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- If you're making another cutscene, replace all of the "PointA"s and "PointB"s into the names of your cameras --
- local TweenService = game:GetService("TweenService")
- local CutscenesFolder = game.ReplicatedStorage:WaitForChild("Cutscenes")
- local CutsceneEvent = CutscenesFolder:WaitForChild("Cutscene1")
- local CutsceneCameras = game.Workspace:WaitForChild("CutsceneCameras")
- local PointA = CutsceneCameras:WaitForChild("CameraA")
- local PointB = CutsceneCameras:WaitForChild("CameraB")
- local CutsceneTime = 10
- local TweenInfo = TweenInfo.new(
- CutsceneTime,
- Enum.EasingStyle.Sine,
- Enum.EasingDirection.Out,
- 0,
- false,
- 0
- )
- CutsceneEvent.OnClientEvent:Connect(function()
- game.Workspace.Camera.CameraType = Enum.CameraType.Scriptable
- game.Workspace.Camera.CFrame = PointA.CFrame
- local Tween = TweenService:Create(game.Workspace.Camera, TweenInfo {CFrame = PointB.CFrame})
- Tween:Play()
- wait(CutsceneTime)
- game.Workspace.Camera.CameraType = Enum.CameraType.Custom
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement