Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
1

Displaying User Input

Asked by
Nytroz 15
6 years ago

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

Log in to vote
-1
Answered by
Trewier 146
6 years ago

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.

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? Nytroz 15 — 6y
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 Trewier 146 — 6y
Ad

Answer this question