What happened to it?

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

Please help. Thanks! <3

1 Like

Hello @Joshua,

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

I hope this helps :smile:!

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.