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

How do i change the position of a textbutton in a scrolling gui?

Asked by 4 years ago

My problem currently is that my text buttons are not going into a list format they just stay in the same position.

Code: label.Position = UDim2.new(0.027, 0, i * template.Size.Y.Scale, 0) --This is the part that needs to be fixed.

1 answer

Log in to vote
0
Answered by 4 years ago

I think the issue may be that template.Size.Y.Scale is not even an actual property. Unless you predefined it, that would be the issue. What I would do is:

label.Position = UDim2.new(0.027, 0, 0.024 * (i-1), 0)

Basically, this adds .027 to the index of a table minus 1, which basically makes sure the first spot isn't a gap. You would also have to add the original position to the equation. Let me know if this helped.

0
I did have to mess around with the values, but this worked preston1196 82 — 4y
Ad

Answer this question