Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why won't this make a GUI?

Asked by 10 years ago

I have been on the wiki and I put it in a local script but whenever I join it won't pop up. It says there is an error in the second to last line, but it doesn't say what is wrong with it. Thank you!

local ScreenGui = InScreenGuitance.new("ScreenGuicreenGui")
ScreenGui.Parent = script.Parent
ScreenGui.Name = "ShopGui"

local textButton = InScreenGuitance.new("TextextButtonutton")
textButton.Parent = ScreenGuihopGui
textButton.Position = UDim2(0,2,0,300)
textButton.Size = UDim2(0,100,0,30)
textButton.BackgroundColor3 = BrickColor.Random().Color
textButton.Text = "Shop"
textButton.Font = "Legacy"
textButton.FontSize = "Size14"
textButton.TextColor3 = BrickColor.Random().Color

textButton.MouseButton1Down:connect(Function()
    textButton.Visible = false -- error here but doesn't say what I did wrong
end
0
Your errors are on lines 1 and 5. There's not such thing as "InScreenGuitance.new." It's Instance.new("ScreenGui") and Instance.new("TextButton") NoahWillCode 370 — 10y
0
oh...thats from replacing s with "ScreenGui", learned not to do that snoppyploptart 59 — 10y

1 answer

Log in to vote
1
Answered by 10 years ago

Well, here is your problem...

local ScreenGui = InScreenGuitance.New("ScreenGuicreenGui")

If you wanted to create a new ScreenGui you would do

local ScreenGui = Instance.new("ScreenGui")

And same with textbutton

local textbutton = Instance.new("TextButton")
Ad

Answer this question