NewGUI = game.StarterGui Instance.new("Frame") GUIClosed = false Frame = game.StarterGui.Frame if GUIClosed == false then NewGUI end Frame.Name = "Frame" Frame.BackgroundColor3 = "255,255,255" Frame.BackgroundTransparency = "0" Frame.BorderColor3 = "0,0,0" Frame.BorderSizePixel = "2" Frame.Position = "{0,450},{0,10}" Frame.Size = "{0,100},{0,100}"
Not Working. I Run The Script Then Get Nothing, Please Help!
Actually, there are more issues than previously stated. First off, the GUI must be created in each player's > PlayerGui , not the > StarterGui . Another error, the > Frame will not be visible unless in a > ScreenGui . For example, you can put this in a LocalScript:
local plr = game.Players.LocalPlayer; local folder = plr.PlayerGui; local thing = Instance.new("ScreenGui", folder); local Frame = Instance.new("Frame",thing); Frame.Name = "Frame"; Frame.BackgroundColor3 = Color3.new(255,255,255); Frame.BackgroundTransparency = 0; Frame.BorderColor3 = Color3.new(0,0,0); Frame.BorderSizePixel = 2; Frame.Position = UDim2.new(0,450,0,10); Frame.Size = UDim2,new(0,100,0,100);
I found the error, it's a simple grammar typo.
NewGUI = game.StarterGui Instance.new("Frame")
You didn't put a . between StarterGui and Instance.new
So it should be
NewGUI = game.StarterGui.Instance.new("Frame")
It may work better if you do
NewGUI = Instance.new("Frame", game.StarterGui)