Advertisement
Sungmingamerpro13

Cutscene2(STORY GAME)

Nov 29th, 2022 (edited)
269
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. local TweenService = game:GetService("TweenService")
  2. local Camera = game.Workspace.CurrentCamera
  3.  
  4. local function MoveCamera(StartPart, EndPart, Duration, EasingStyle, EasingDirection)
  5. Camera.CameraType = Enum.CameraType.Scriptable
  6. Camera.CFrame = StartPart.CFrame
  7. local Cutscene = TweenService:Create(Camera, TweenInfo.new(Duration, EasingStyle, EasingDirection), {CFrame = EndPart.CFrame})
  8. Cutscene:Play()
  9. wait(Duration)
  10. end
  11.  
  12. local function Cutscene()
  13. MoveCamera(workspace.Cutscenes.CameraC, workspace.Cutscenes.CameraD, 5 , Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
  14. wait(.5)
  15. Camera.CameraType = Enum.CameraType.Custom
  16. Camera.CameraSubject = game.Players.LocalPlayer.Character:WaitForChild("Humanoid")
  17. end
  18.  
  19. game.ReplicatedStorage.CutsceneEvents.Cutscene2.OnClientEvent:Connect(function()
  20. Cutscene()
  21. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement