Before you think this is unrelated to scripting, I am messing around with GUIs, ie... full on scripting the entirety of the GUI, no actual physical part in studio, just a script in StarterGui.
As far as I have gotten is to the 'Frame' for it, but when I test it in-game, and look inside of my PlayerGUI, it shows that the Frame is inside of the ScreenGui, but it isn't visible, with the visible property automatically set to true, I simply can't see it.
Before I give you the script, I have checked the output, there is nothing that comes out of it.
Here is a screenshot to show you, in-case you haven't been able to follow along. http://prntscr.com/fr279h
local x = Instance.new("ScreenGui", game.Players.LocalPlayer.PlayerGui) x.Name = 'Vaux GUI' local f = Instance.new("Frame", game.Players.LocalPlayer.PlayerGui['Vaux GUI']) f.Active = true
Unefficient use of parenting an instance.
Source : devforum.ROBLOX
Wrong version :
local x = Instance.new("ScreenGui", game.Players.LocalPlayer.PlayerGui) -- Wrong! x.Name = 'Vaux GUI' local f = Instance.new("Frame", game.Players.LocalPlayer.PlayerGui['Vaux GUI']) -- Wrong! f.Active = true
Corrected version:
local x = Instance.new("ScreenGui") -- Create Instance. x.Name = 'Vaux GUI' -- Make adjustments to properties. x.Parent = game.Players.LocalPlayer.PlayerGui -- Parent the instance in the last line possible. local f = Instance.new("Frame") -- Create frame. f.Active = true -- Make frame active. f.Size = UDim2.new(0.25,0 ,0.25,0) --Provide a size for the frame, because the initial size is UDim(0,0,0,0) f.Parent = x -- Parent the frame to the gui, by just stating the variable "x" which is defined above.
Should work now.
I am still learning RbxLua.
Thank you for reading.