Troubles with button guis and y axis?
I'm having issues with the y axis of my buttons. He's the code:
003 | local tool = script.Parent |
004 | local frame = tool.Frame |
005 | local label = frame.Label |
006 | local list = frame.List |
007 | local createTool = frame.CreateTool |
008 | local createItem = frame.CreateItem |
009 | local processItem = frame.Process |
010 | local clear = frame.Clear |
014 | function getDist(a, b) |
015 | return (a - b).magnitude |
018 | function checkIngTable(part) |
019 | for index, child in pairs (ingTable) do |
020 | if part = = child then |
029 | local ing = ingTable [ index ] |
038 | function ingReal(index) |
039 | local ing = ingTable [ index ] |
046 | function saveIng(index) |
047 | local ing = ingReal(index) |
050 | table.remove(ingTable, index) |
054 | function setListName() |
055 | for index, child in pairs (ingTable) do |
057 | list.Text = child.Name |
059 | list.Text = list.Text.. ", " ..child.Name |
078 | function deleteTable() |
079 | for index, child in pairs (ingTable) do |
086 | function choices(choiceTab) |
087 | local buttons = tool.Parent.Parent.PlayerGui.ScreenGui:GetChildren() |
089 | for index, child in pairs (buttons) do |
090 | if child.Name = = "ChoiceButton" then |
096 | local buttonText = "" |
099 | for index, child in pairs (choiceTab) do |
100 | local button = Instance.new( "TextButton" ) |
101 | button.Position = UDim 2. new( 0.35 , 0 , index * 0.05 + 0 ) |
102 | button.Size = UDim 2. new( 0.1 , 0 , 0.05 , 0 ) |
103 | button.BackgroundColor 3 = Color 3. new( 0 , 0 , 0 ) |
104 | button.TextColor = BrickColor.new( 1 ) |
105 | button.Name = "ChoiceButton" |
107 | button.MouseButton 1 Down:connect( function () clicked = button print ( "Picked a choice" ) end ) |
108 | button.Parent = tool.Parent.Parent.PlayerGui.ScreenGui |
110 | table.insert(buttonTab, button) |
113 | while clicked = = nil do |
118 | buttonText = clicked.Text |
120 | for index, child in pairs (buttonTab) do |
I cannot seem to change the y axis of buttons by changing
1 | button.Position = UDim 2. new( 0.35 , 0 , index * 0.05 + 0 ) |
Help? Thanks!