Why are TextBoxes not showing in ScrollingFrame? [HELP]
I am an experienced scripter, however there is something I can't figure out. So, I've been trying to figure out why does this happen.
When I set up the GUI some of the Text boxes do not show, I have been brainstorming what is wrong with it, I can't figure it out. I am sure it's a problem with scaling, but I definitely could be wrong.
01 | script.Parent.GUI.ScriptGUI.Visible = true |
02 | repeat wait() until script.Parent:FindFirstChild( "GUI" ) ~ = nil |
04 | local shopGUI = script.Parent.GUI.ScriptGUI |
06 | local frame 1 = shopGUI.Scripts |
07 | local frame 2 = shopGUI [ "Scripts2" ] |
09 | local tab 1 = shopGUI.TabScripts |
10 | local tab 2 = shopGUI [ "TabScripts2" ] |
12 | local frame = { frame 1 , frame 2 } |
13 | local tab = { tab 1 , tab 2 } |
15 | local currentTab = frame 1. Name |
17 | local event = game.ReplicatedStorage.RemoteEvent |
19 | [ local enableEvent = game.ReplicatedStorage.EnableEvent |
20 | local disableEvent = game.ReplicatedStorage.DisableEvent ] (http://) |
22 | local setupShop = { "Scripts" , "Scripts2" } |
23 | local box = shopGUI.ItemBox:clone() |
28 | local lastFrame = frame 1 |
31 | local currentTab = frame 1. Name |
34 | tab [ i ] .MouseButton 1 Down:connect( function () |
35 | lastTab.BorderSizePixel = 3 |
36 | lastFrame.Visible = false |
39 | frame [ i ] .Visible = true |
40 | currentTab = frame [ i ] .Name |
41 | script.Parent.GUI.ScriptGUI.BackgroundColor 3 = tab [ i ] .BackgroundColor 3 |
42 | tab [ i ] .BorderSizePixel = 0 |
46 | for x = 1 , #setupShop do |
48 | local items = game.ReplicatedStorage.Items [ setupShop [ x ] ] :GetChildren() |
50 | local newBox = box:clone() |
52 | newBox.Parent = shopGUI [ setupShop [ x ] ] .SelectionFrame |
53 | newBox.Name = items [ i ] .Name |
54 | newBox.Position = newBox.Position + UDim 2. new( 0 , 0 , (- 0.05 ) + 0.05 *i, 0 ) |
55 | newBox.Text = items [ i ] .Name |
56 | shopGUI [ setupShop [ x ] ] .SelectionFrame.CanvasSize = UDim 2. new( 0 , 0 , 0.05 *i, 0 ) |
57 | newBox.Check.Visible = false |
58 | shopGUI [ setupShop [ x ] ] .SelectionFrame [ items [ i ] .Name ] .MouseButton 1 Click:connect( function () |
59 | if toggle = = true then |
60 | print (items [ i ] .Name.. " was clicked" ) |
61 | local scriptclone = game.ReplicatedStorage.Items [ setupShop [ x ] ] [ items [ i ] .Name ] .Script:clone() |
62 | scriptclone.Parent = game.Players.LocalPlayer.Backpack |
63 | shopGUI.Visible = false |
64 | event:FireServer(game.Players.LocalPlayer) |
Here's the link for what the GUI looks like in the explorer.
v
Explorer