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

Need help with a Gui involving a text button opening a Gui?

Here is my current code...

NOTE: This is a local script, it is in the submitbutton

local plr = game.Players.LocalPlayer
local gui = plr.PlayerGui.godus.Frame
local textbox = plr.PlayerGui.ENGINE.Background.TextBox
local code = "test"

script.Parent.MouseButton1Click:connect(function(submitcode)
if textbox.Text == code then
gui.Visible = true
end
end)

7 comments

0

What are you trying to do with this code, also the "~~~~~~~~~~~~~~~~~" must be on its own line

0

I'm trying to make a gui open when a specfic code is entered in the textbox

0

Can you confirm that the event is being ran by adding a print at the 1st line of the mouseButton1Click

0

Here is the output for the gui : 14:03:55.090 - godus is not a valid member of PlayerGui 14:03:55.091 - Script 'Players.Player1.PlayerGui.ScreenGui.Background.SubmitButton.LocalScript', Line 2 14:03:55.091 - Stack End

0

godus is the other gui that I've been trying to open...

0

I see try plr.PlayerGui:waitForChild('godus').Frame thiw will eather stop the script as the gui is not found or will wait till its found. In both cases the problem is how you are trying to access the gui

0

Where do insert that piece of code?

1 answer

if textbox.Text == code Here i think u made a mistake, if the text doesn't exist make it visible

Try this.

Replace your line

if textbox.Text == code

With:

if textbox.Text ~= code

1 comment

0

Tried it, the other gui didn't open :v

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