1.What do you want to achieve? I want to achieve a camera cutscene with only using scripts and not plugins.
2.What is the issue? The issue is that whenever I click the button, it won’t load cutscene.
3.What solutions have you tried so far? Tutorials didn’t help me and didn’t help me.
local TweenService = game:GetService("TweenService")
local camera = game.Workspace.Camera
function tween(part1,part2,cutsceneTime)
local tweenInfo = TweenInfo.new(
cutsceneTime,
Enum.EasingStyle.Sine,
Enum.EasingDirection.Out,
0,
false,
0
)
local tween = TweenService:Create(camera, tweenInfo, {CFrame = part2.CFrame})
tween:Play()
wait(cutsceneTime)
camera.CameraType = Enum.CameraType.Custom
end
wait(2)
game.StarterGui.ScreenGui.TextButton.MouseButton1Click:Connect(function()
tween(game.Workspace.Part1,game.Workspace.Part2,5)
end)