You are missing a parameter in your TweenInfo. After your false, you need to enter a number (in seconds) of the delay you want in between each tween. Hope this helps!
local tweenInfo = TweenInfo.new(
8, -- How long should the tween take?
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out,
10, -- Repeat times
true, -- Should the tween repeat
0 -- Tween delay
)
local button = script.Parent
local ts = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(50, Enum.EasingStyle.Elastic, Enum.EasingDirection.InOut, 1, false)
local vectors = {Vector3.new(2000,2000,2000), Vector3.new(1995,1995,1995), Vector3.new(1996,1996,1996), Vector3.new(2007,2007,2007)}
local tweens = {}
local fantasia = workspace:WaitForChild("Fantasia")
local explosions = workspace:WaitForChild("BlueExplosion"):GetChildren()
local fantasiaGoals = {Size = vectors[1], Transparency = 0}
local fantasiaTween = ts:Create(fantasia, tweenInfo, fantasiaGoals)
for i, explosion in ipairs(explosions) do
local goals = {Size = vectors[i+1], Transparency = 0}
local newTween = ts:Create(explosion, tweenInfo, goals)
table.insert(tweens, newTween)
end
button.MouseButton1Click:Connect(function()
fantasiaTween:Play()
for _, tween in ipairs(tweens) do
tween:Play()
end
end)
Create as little as possible inside of callback functions connected to events as they are recreated each time the event is fired and the callback is subsequently executed. In the above I’ve moved all the tween creation outside of the callback and the callback simply handles the playing of each created tween.
I’m aware, the fixes I made are still necessary for your game to run smoothly. Recreating the same constants and tweens and everything else inside the callback function connected to the event is incredibly strenuous, it’s much better to create, initialise and reference the required assets, instances etc. outside of the function and only perform necessary actions inside the function, as those actions are performed each time the event is fired, in this case whenever a Gui button is clicked.