Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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

✓ Accepted answer

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.

1 comment

0

I did have to mess around with the values, but this worked

This discussion is preserved as it was. New answers, comments, and votes are closed.