I'm working on a Roblox game, I want a TextLabel
to move from right to left repeatadly and smoothly.
Something like this:
https://youtu.be/9f7xAxKtjXc
I have already tried to tween the Textlabel
on hiting corner it will restart but it wasn't smooth.
I'm expecting the TextLabel to move from right to left smoothly as in the video above.
Code I have tried:
local text = {script.Parent.TextLabel}
while wait() do
for _,v in pairs(text) do
local temp = v.Position.X.Scale
if (temp <= -v.Size.X.Scale) then
temp = 1.0
end
v.Position = UDim2.new(temp - 0.01, 0, 0.2, 0)
end
end