Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Change position of a TextLabel?

Asked by 6 years ago
Edited 6 years ago

Hello,

I am running through a loop creating TextLabels inside of a scrolling frame, and it creates them, sizes them and changes the position, but they don't move from one position to what they are told, and when I scroll down with the Scrolling frame all the textlabels stay at the top.

while true do
    wait(1)

    if game.Workspace.NewsLimit.NewLimit.Value >= 1 then
        local news = Instance.new("TextLabel", script.Parent.UpdateLog)
        news.Name = game.Workspace.NewsLimit.NewLimit.Value
        news.Size =  UDim2.new(0, 297,0, 20)
        news.Position = UDim2.new(0, 0, script.Parent.NewPosition.Value, 0)


        script.Parent.UpdateMany.Value = script.Parent.UpdateMany.Value + 1 
        script.Parent.NewPosition.Value = script.Parent.NewPosition.Value + 10
    end
end

https://gyazo.com/01431e590e1a930d658a840bfcd4e353 https://gyazo.com/c3c288c1c2d819027132217f702b60d5

Thanks, Ethan!

0
So how do I fix it? Starhawke_r 11 — 6y
0
Use a changed event. hiimgoodpack 2009 — 6y
0
And how do I use it with how I am doing it? Starhawke_r 11 — 6y
0
Its a suggestion in code improvements, not fixing your problem. hiimgoodpack 2009 — 6y
0
Just insert the UIConstraint which will allow them to go down in a straight line without a script, it's much more easier. xEiffel 280 — 6y

Answer this question