Ion = script.Parent
local goal1 = {}
goal1.Position = Ion.Position + Vector3.new(0,2,0)
local goal2 = {}
goal2.Position = Ion.Position
local TweenService = game:GetService("TweenService")
while true do
local tweenInfo = TweenInfo.new(2)
local tween1 = TweenService:Create(Ion, tweenInfo, goal1)
tween1:Play()
local tweenInfo = TweenInfo.new(2)
local tween2 = TweenService:Create(Ion, tweenInfo, goal2)
tween2:Play()
end
Also, if you want to make a Tween loop, I’d recommend not using a while true do loop, but rather by setting the tween to infinitely loop using TweenInfo.new().
Ion = script.Parent
local goal1 = {}
goal1.Position = Ion.Position + Vector3.new(0,2,0)
local goal2 = {}
goal2.Position = Ion.Position
local TweenService = game:GetService("TweenService")
while true do
local tweenInfo = TweenInfo.new(2)
local tween1 = TweenService:Create(Ion, tweenInfo, goal1)
tween1:Play()
tween1.Completed:Wait()
local tweenInfo = TweenInfo.new(2)
local tween2 = TweenService:Create(Ion, tweenInfo, goal2)
tween2:Play()
tween2.Completed:Wait()
end
Tweens don’t pause the script so the going up and down tween gets overridden. So, you have to wait until the first tween completed and then play the second one
Yes but, I ran into this problem that i dont want the tween complete, i mean, yes i want but i dont want to wait for the tween to complete, and all the parts transparency gets to 0 directly, how i would do that?, and why that “2” in tweenInfo