Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why won't this make a GUI?

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

2 comments

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")

0

oh...thats from replacing s with "ScreenGui", learned not to do that

1 answer

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")

This discussion is preserved as it was. New answers, comments, and votes are closed.