Basically, I am trying to make an introduction to my game where the dots move up and down. For some reason, I dont know if its a typo, but this happens:
Script for dot one:
function MoveDot()
script.Parent:TweenPosition(UDim2.new(0.464,-18,0.879,-37), "Out", "Sine", 1)
wait(1)
script.Parent:TweenPosition(UDim2.new(0.465,-18,0.943,-37), "Out", "Sine", 1)
end
local StopRunning = 1
repeat
MoveDot()
wait(6)
until
StopRunning == 2
Script for dot 2:
--cords: {0.499, -18},{0.879, -37}
function MoveDot()
script.Parent:TweenPosition(UDim2.new(0.449,-18,0.879,-37), "Out", "Sine", 1)
wait(1)
script.Parent:TweenPosition(UDim2.new(0.499,-18,0.943,-37), "Out", "Sine", 1)
end
local StopRunning = 1
repeat
MoveDot()
wait(6)
until
StopRunning == 2
I think I can help you with this. Here is something that I have created in the past!
I have changed the script a bit so it is closer to what you are looking for. To stop the dots from bouncing set Running to false.
local Dots = { script.Parent.Dot1, script.Parent.Dot2, script.Parent.Dot3}
local TS = game:GetService("TweenService")
local Running = true
while Running == true do
for i, v in pairs(Dots) do
TS:Create(v, TweenInfo.new(0.5, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, true), {Position = UDim2.fromScale(v.Position.X.Scale, v.Position.Y.Scale - 0.02)}):Play()
wait(1)
end
end