How do you get the text of a players local textbox GUI and store it in a stringValue?

I have a textbox where players will type in something and then “submit” their text by pressing a button. I want to extract the text that the player types, with another script, at a certain time and put the text in a new instance string value in server storage. I have tried using the text below, but it seems that it only copies the text that was in the text section of the textbox before the player typed in their text (the compile time text if that makes sense)…

This is the code I have tried:

-- Script
game.ReplicatedStorage.RemoteFunction.OnServerInvoke = function(playerGUI, prompt)
	tempPrompt.Value = prompt
end

--Local Script
game.ReplicatedStorage.RemoteFunction:InvokeServer(script.Parent.GUIS.WriteIn.TEXTINFO.Text)	

Thanks!

Instead of Invoking the server immediately, try using

textbox.FocusLost

Pretty much all that does is send in whatever they player typed after they pressed their enter key.

You could use a remote event, then you send whatever texts that’s inside the text box using TextBox.Text as the data parameter of firing/invoking the server.