I am trying to make a scrolling textlabel, so that the text scrolls and shows the train’s destination.
The script:
local images = {script.Parent}
while wait() do
for _,v in pairs(images) 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, 0)
end
end
There is your problem. You have put all the Guis into one part. And you have added a scrolling part of which has overlapped the other guis. So, Seperate the parts into their rows. This should solve your problem.
Ib that case you have to separate the Calling at and Ashford road scrolling and adjust the part if which holds the scrolling text as a barrier for when it reaches the Calling at.
I want to make the Calling at: stay still but the stations fade out when they reach Calling at. I want it to keep scrolling until the last station has been seen
You can concatenate the text you want to display into a string, and only display a substring with fixed characters with increasing starting index. The other option is to make scrolling text a text label under a frame with ClipsDescendants. If you care about localization it might be more compatible to use the second option.
I have an example place that includes both of the options. scrollingText.rbxl (45.8 KB)
You can do it by tweening ScrollingTextLabel’s position from UDim2.fromScale(1, 0) to UDim2.fromScale(-ScrollText.AbsoluteSize.X/parentClipFrame.AbsoluteSize.X, 0) once.
I published the model here that supports loop/wrap configuration:
You can check the sample usage here: SampleUsage.rbxl (36.4 KB)
There is a script called ExampleUsage in ServerScriptService
For your use case, you want to scroll the text once and stop by changing its position from 1 to -scale with small lerps in between. My implementation has extra code for other minor edge cases.