I just want one value to go in a text box,but I get all six values in a text box. For example,I want text box 1 to just have the value of 1 and text box 2 to have the value of 2.
-------------Table-------------
names = {"yo","2","3","4","5","6" }--The names
values = {"13123","1232","3123","1234","1235","612312"}--The values
----ScrollingFrame Creation-----
s = Instance.new("ScrollingFrame",script.Parent)--Makes the ScrollingFrame
s.Position = UDim2.new(0,50,0,30)
s.Size = UDim2.new(0,700,0,540)
s.CanvasSize = UDim2.new(0,0,6,6)
----TextButton Table Creation-----
for i,v in pairs (names) do
print(v)--Test Test
h = Instance.new("TextButton",s)--Puts it all in the ScrollingFrame
h. Text = v
h.Name = v
h.Size = UDim2.new(0,100,0,100)
------Value Creation--------------
for x,n in pairs (values) do
str = Instance.new("StringValue",h)
str.Name = values[x]
str.Value = values[x]
end
----TextButton Sorting------------
h.Position = UDim2.new(0, 0, 0, (i*100)-100)--For each name move up one
end

1 comment
Edited because I forgot to put the values.