-
What do you want to achieve? Keep it simple and clear!
I want to achieve a camera loop that breaks off instantly. I have tried many different ways and the best solution I have found so far was to create an active check to see if the button is active and to break if it wasnt. -
What is the issue? Include screenshots / videos if possible!
The Camera loop isnt instantly switching to the next one camera loop it waits until the camera fully finishes the tween. -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
As i previously stated I have tried to use an active check although this is good it isnt what i want. I also tried making a custom wait but I probably did it incorrectly. The last thing i did to improve the time was to add coroutines which did help significantly but still isnt exactly what i wanted.
heres a video vvv
this is the script vvv
btw reroll = customize
local function RerollCamera()
--// Camera Tween
local function TweenCameraPos(Point, Speed)
tweenService:Create(cam, TweenInfo.new(Speed, Enum.EasingStyle.Linear), {CFrame = Point.CFrame}):Play()
end
--// Camera Sequence
while rerollBtn.Active do
if rerollBtn.Active == false then return end
cam.CFrame = campoints3:FindFirstChild("1").CFrame
TweenCameraPos(campoints3:FindFirstChild("2"), 2)
task.wait(2)
if rerollBtn.Active == false then return end
cam.CFrame = campoints3:FindFirstChild("2").CFrame
TweenCameraPos(campoints3:FindFirstChild("3"), 2)
task.wait(2)
if rerollBtn.Active == false then return end
cam.CFrame = campoints3:FindFirstChild("3").CFrame
TweenCameraPos(campoints3:FindFirstChild("4"), 2)
task.wait(2)
if rerollBtn.Active == false then return end
cam.CFrame = campoints3:FindFirstChild("4").CFrame
TweenCameraPos(campoints3:FindFirstChild("5"), 2)
task.wait(2)
if rerollBtn.Active == false then return end
cam.CFrame = campoints3:FindFirstChild("5").CFrame
TweenCameraPos(campoints3:FindFirstChild("6"), 2)
task.wait(2)
if rerollBtn.Active == false then return end
cam.CFrame = campoints3:FindFirstChild("6").CFrame
TweenCameraPos(campoints3:FindFirstChild("1"), 2)
task.wait(2)
if rerollBtn.Active == false then return end
end
end