#how to break a cutscene camera loop with a button press

1 messages · Page 1 of 1 (latest)

burnt cape
#

when i click play it doesnt break the tween

stiff quiver
#

dont show us your script then

burnt cape
#

yes

#
local plr = game.Players.LocalPlayer
local plrgui = plr.PlayerGui

local CC = workspace.CurrentCamera

local Cameras = game.Workspace:WaitForChild("Cameras")
local MenuCams = Cameras:WaitForChild("MenuCams")
local Set1 = MenuCams.Set1
local S1C1 = Set1:WaitForChild("Cam1")
local S1C2 = Set1:WaitForChild("Cam2")

local Set2 = MenuCams.Set2
local S2C1 = Set2:WaitForChild("Cam1")
local S2C2 = Set2:WaitForChild("Cam2")

local Set3 = MenuCams.Set3
local S3C1 = Set3.Cam1
local S3C2 = Set3.Cam2

local RS = game:GetService("RunService")

local TS = game:GetService("TweenService")
local TI = TweenInfo.new(8.3, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut)
local TI2  = TweenInfo.new(.6, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut)

local Fade = plrgui.Fade
local FadeFrame = Fade.Frame

local Play = plrgui["Main Menu"]:WaitForChild("Frame"):WaitForChild("Play")

local Set1Tween = TS:Create(CC, TI, {CFrame = S1C2.CFrame})
local Set2Tween = TS:Create(CC, TI, {CFrame = S2C2.CFrame})
local Set3Tween = TS:Create(CC, TI, {CFrame = S3C2.CFrame})

local FadeTweenIn = TS:Create(FadeFrame, TI2, {BackgroundTransparency = 0})
local FadeTweenOut = TS:Create(FadeFrame, TI2, {BackgroundTransparency = 1})

local LobbyCams = true

local function LFade(NextSetCam)
    FadeTweenIn:Play()

    task.wait(.6)

    CC.CFrame = NextSetCam.CFrame

    task.wait(.6)

    FadeTweenOut:Play()
end

local function Fade(NextSetCam)
    FadeTweenIn:Play()

    FadeTweenIn.Completed:Wait()

    FadeTweenOut:Play()
end

Play.MouseButton1Click:Connect(function()
    Fade()
    LobbyCams = false
end)

while LobbyCams do    
    CC.CameraType = Enum.CameraType.Scriptable
    LFade(S1C1)

    Set1Tween:Play()

    Set1Tween.Completed:Wait()
    
    LFade(S2C1)

    Set2Tween:Play()

    Set2Tween.Completed:Wait()
    
    LFade(S3C1)
    
    Set3Tween:Play()
    
    Set3Tween.Completed:Wait()
end

#

MY code that I MYSELF wrote

#

NOT ai

burnt cape
#

@stiff quiver ???

heady ravine
#

you can check the docs for it

burnt cape
#

so do i just stop all tweens

heady ravine
#

yeah you can prob

burnt cape
#

it works but i have to click it 3 times for it to stop

#

yea i still need help any1

midnight ingot
#

change the camera type to custom in the mouse button click

burnt cape
#

what if i want it to go from like a different camera