IM trying to create an instance oa a screengui that has the parent of startergui, but it isnt working. I have tried making the parent the workspace, which worked, but when I move the the instance into startergui, nothing shows up. Nothing shows up in the output either
local scrgui1 = Instance.new("ScreenGui",StarterGui)
scrgui1.Name = "scrgui1"
local txtgui1 = Instance.new("TextBox",scrgui1)
txtgui1.Name = "txtgui1"
txtgui1.Text = "Text"
local txtgui2 = Instance.new("TextBox",scrgui1)
txtgui2.Name = "txtgui2"
txtgui2.Text = "Moretext"
txtgui2.Position = UDim2.new(0,200) -- Move it 200px below txtgui1

1 comment
Your problem is line 1: You're trying to call 'StarterGui' as if it were a variable; however, the script is taking it as a 'nil value'. A way you can fix this is creating a variable that which defines the 'StarterGui' service, or just replacing the nil value all together. :)