Hello! I’ve been working on a plugin and I recently got this message
“Out of local registers”
I know there is a max of 200 local vars, I heard you can combat this by making a table, sadly I tried and it doesn’t even work saying to remove local, then it suggests to change it to local again. How can I properly fix this?
Note: The original table has over 200 local vars
local CoolTable = {
local Lunarious_UI = Instance.new("ScreenGui")
local Frame = Instance.new("Frame")
local ResizeWholeScreenButton = Instance.new("TextButton")
local UICorner = Instance.new("UICorner")
local InsertTextButton = Instance.new("TextButton")
local UICorner_2 = Instance.new("UICorner")
local InsertTextButton_Button = Instance.new("TextButton")
local UICorner_3 = Instance.new("UICorner")
local InsertTextBox = Instance.new("TextButton")
local UICorner_4 = Instance.new("UICorner")
local InsertScrollingFrameButton = Instance.new("TextButton")
local UICorner_5 = Instance.new("UICorner")
local InsertImage = Instance.new("TextButton")
local UICorner_6 = Instance.new("UICorner")
local InsertFrameButton = Instance.new("TextButton")
local UICorner_7 = Instance.new("UICorner")
local UICorner_8 = Instance.new("UICorner")
local BrowseUI = Instance.new("Folder")
local Section_1 = Instance.new("Folder")
local Sample1 = Instance.new("Frame")
local UICorner_9 = Instance.new("UICorner")
local Sample1_Shadow = Instance.new("Frame")
local UICorner_10 = Instance.new("UICorner")
local Sample2 = Instance.new("Frame")
local UICorner_11 = Instance.new("UICorner")
local Sample2Curve = Instance.new("Frame")
local UICorner_12 = Instance.new("UICorner")
local Sample2_Shadow = Instance.new("Frame")
local UICorner_13 = Instance.new("UICorner")
local BackButton = Instance.new("TextButton")
local UICorner_14 = Instance.new("UICorner")
local PageUpButton = Instance.new("TextButton")
local UICorner_15 = Instance.new("UICorner")
local Selection1Button = Instance.new("TextButton")
local Selection2Button = Instance.new("TextButton")
local PremadeTitle1 = Instance.new("TextLabel")
local PremadeTitle2 = Instance.new("TextLabel")
local SampleText1 = Instance.new("TextLabel")
local SampleText2 = Instance.new("TextLabel")
local SampleTitle1 = Instance.new("TextLabel")
local SampleTitle2 = Instance.new("TextLabel")
local Section_2 = Instance.new("Folder")
local Sample3 = Instance.new("Frame")
local UICorner_16 = Instance.new("UICorner")
local Sample3_Shadow = Instance.new("Frame")
local UICorner_17 = Instance.new("UICorner")
local Sample4 = Instance.new("Frame")
local UICorner_18 = Instance.new("UICorner")
local Sample4_Shadow = Instance.new("Frame")
local UICorner_19 = Instance.new("UICorner")
local BackButton2 = Instance.new("TextButton")
local UICorner_20 = Instance.new("UICorner")
local PageUpButton2 = Instance.new("TextButton")
local UICorner_21 = Instance.new("UICorner")
local Selection3Button = Instance.new("TextButton")
local Selection4Button = Instance.new("TextButton")
local PremadeTitle3 = Instance.new("TextLabel")
local PremadeTitle4 = Instance.new("TextLabel")
local SampleText3 = Instance.new("TextLabel")
local SampleText4 = Instance.new("TextLabel")
local SampleTitle3 = Instance.new("TextLabel")
local SampleTitle4 = Instance.new("TextLabel")
local Section_3 = Instance.new("Folder")
local PremadeTitle5 = Instance.new("TextLabel")
local SampleTitle6 = Instance.new("TextLabel")
local Selection6Button = Instance.new("TextButton")
local PremadeTitle6 = Instance.new("TextLabel")
local BackButton3 = Instance.new("TextButton")
local UICorner_22 = Instance.new("UICorner")
local SampleTitle5 = Instance.new("TextLabel")
local Selection5Button = Instance.new("TextButton")
local Sample5 = Instance.new("Frame")
local UICorner_23 = Instance.new("UICorner")
local Sample5_Corner = Instance.new("Frame")
local UICorner_24 = Instance.new("UICorner")
local Sample6 = Instance.new("Frame")
local UICorner_25 = Instance.new("UICorner")
local Sample6_Prompt = Instance.new("Frame")
local UICorner_26 = Instance.new("UICorner")
local Sample6_Bar = Instance.new("Frame")
local UICorner_27 = Instance.new("UICorner")
local BrowseTitle = Instance.new("TextLabel")
local Description3 = Instance.new("TextLabel")
local BrowseUIButton = Instance.new("TextButton")
local UICorner_28 = Instance.new("UICorner")
local Description2 = Instance.new("TextLabel")
local InsertScreenGui = Instance.new("TextButton")
local UICorner_29 = Instance.new("UICorner")
local InsertImageButton = Instance.new("TextButton")
local UICorner_30 = Instance.new("UICorner")
local Title = Instance.new("TextLabel")
local Description = Instance.new("TextLabel")
local Files = Instance.new("Folder")
local InsertSamples = Instance.new("Folder")
local Frame_2 = Instance.new("Frame")
local UICorner_31 = Instance.new("UICorner")
local ScrollingFrame = Instance.new("ScrollingFrame")
local UICorner_32 = Instance.new("UICorner")
local TextLabel = Instance.new("TextLabel")
local ScreenGui = Instance.new("ScreenGui")
local TextButton = Instance.new("TextButton")
local UICorner_33 = Instance.new("UICorner")
local ImageLabel = Instance.new("ImageLabel")
local UICorner_34 = Instance.new("UICorner")
local ImageButton = Instance.new("ImageButton")
local UICorner_35 = Instance.new("UICorner")
local TextBox = Instance.new("TextBox")
local UICorner_36 = Instance.new("UICorner")
local PremadeUISamples = Instance.new("Folder")
local Sample1_2 = Instance.new("Folder")
local Frame_3 = Instance.new("Frame")
local UICorner_37 = Instance.new("UICorner")
local FrameShadow = Instance.new("Frame")
local UICorner_38 = Instance.new("UICorner")
local SampleText1_2 = Instance.new("TextLabel")
local SampleTitle1_2 = Instance.new("TextLabel")
local Sample2_2 = Instance.new("Folder")
local Sample2_3 = Instance.new("Frame")
local UICorner_39 = Instance.new("UICorner")
local Sample2Curve_2 = Instance.new("Frame")
local UICorner_40 = Instance.new("UICorner")
local Sample2_Shadow_2 = Instance.new("Frame")
local UICorner_41 = Instance.new("UICorner")
local SampleText2_2 = Instance.new("TextLabel")
local SampleTitle2_2 = Instance.new("TextLabel")
local Sample3_2 = Instance.new("Folder")
local Frame_4 = Instance.new("Frame")
local UICorner_42 = Instance.new("UICorner")
local FrameShadow_2 = Instance.new("Frame")
local UICorner_43 = Instance.new("UICorner")
local Description_2 = Instance.new("TextLabel")
local Title_2 = Instance.new("TextLabel")
local Sample4_2 = Instance.new("Folder")
local FrameCorners = Instance.new("Frame")
local UICorner_44 = Instance.new("UICorner")
local Description_3 = Instance.new("TextLabel")
local Title_3 = Instance.new("TextLabel")
local Frame_5 = Instance.new("Frame")
local UICorner_45 = Instance.new("UICorner")
local Sample5_2 = Instance.new("Folder")
local Frame_6 = Instance.new("Frame")
local UICorner_46 = Instance.new("UICorner")
local FrameCorner = Instance.new("Frame")
local UICorner_47 = Instance.new("UICorner")
local SampleTitle5_2 = Instance.new("TextLabel")
local Sample6_2 = Instance.new("Folder")
local Sample6_3 = Instance.new("Frame")
local UICorner_48 = Instance.new("UICorner")
local Sample6_Bar_2 = Instance.new("Frame")
local UICorner_49 = Instance.new("UICorner")
local Sample6_Prompt_2 = Instance.new("Frame")
local UICorner_50 = Instance.new("UICorner")
local SampleText1_3 = Instance.new("TextLabel")
local SampleTitle6_2 = Instance.new("TextLabel")
local ExitButton = Instance.new("TextButton")
local UICorner_51 = Instance.new("UICorner")
local Description3_2 = Instance.new("TextLabel")
local LPositionButton = Instance.new("TextButton")
local UICorner_52 = Instance.new("UICorner")
local CPositionButton = Instance.new("TextButton")
local UICorner_53 = Instance.new("UICorner")
local RPositionButton = Instance.new("TextButton")
local UICorner_54 = Instance.new("UICorner")
local Frame_7 = Instance.new("Frame")
local UICorner_55 = Instance.new("UICorner")
local CoverFrame = Instance.new("Frame")
local UICorner_56 = Instance.new("UICorner")
local Title_4 = Instance.new("TextLabel")
}