Hey There! I’m currently trying to make an infinite background tween effect.
Here is my current code:
My Script
local screenGui = script.Parent
local bgFr = screenGui:WaitForChild("BackFrame")
local fxFr = screenGui:WaitForChild("EffectFrame")
local TS = game:GetService("TweenService")
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
local config = {
TweenTime = 20
}
function Tween(obj,prop,info) -- object to animate, properties to change, tween info.
info = info or TweenInfo.new(
config.TweenTime,
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out,
-1,
true,
0
)
TS:Create(obj,info,prop):Play()
end
while true do
fxFr.Position = UDim2.new(0,0,1,0)
Tween( fxFr, { Position = UDim2.new(1, 0, 0, 0) } )
wait(config.TweenTime)
end
It currently Just bounces back instantly, but i want it to make it look like it is just infinite.
If you want the screenGUI file, here it is:
effectTween.rbxm (5.9 KB)
Thanks for the help!