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

Displaying User Input

So, I have a Setup GUI. When the user clicks confirm I want that data to be stored somewhere so they can be displayed at a later stage.

So the GUI http://prntscr.com/2tlgq1 will take the user input from Team Name and display it in the next GUI http://prntscr.com/2tlh62. My question is "How will I go about doing this?" and "What functions are needed?" I used to have an old code which didn't work. But my Roblox Studio crashed when I had finished it and I was unable to save it. I hoping someone on Scripting Helpers would know what to do.

1 answer

✓ Accepted answer

You would take the text of the first item: teamName = teamName.Text Then you would take the second item: Abv = abbreviation.Text

You would combine them under a button click event:

confirm.Button1Down:connect(function()
teamName = confirm.Parent.teamName.Text
Abv = confirm.Parent.abbreviation.Text
--Your code here for making the next gui
NewScreenGui.Frame.teamName.Text = teamName
NewScreenGui.Frame.abbreviation.Text  = Abv
end)

Of course that would be with these data structures:

(This is the one with the confirm button)

ScreenGui
    -Frame
        -teamName
        -abbreviation

(This is the one that you want to put the stored data into)

NewScreenGui
    -Frame
        -teamName
        -abbreviation

I hope this helps.

2 comments

0

And all of this would go under the button, as a child of the old screen gui or as a child of the new gui?

0

I would keep the code under the button. As a child of oldscreen gui. TBH you don't really have to have two seperate gui's you could use different frames

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