Player Text Input

Hi,

I’m trying to take a players text input from a screenGui and send that data over to a surfaceGui on a monitor in the workspace. I’m not entirely sure how to do this, as the input data is local i cant just have it draw from the textbox so I’m assuming I’ll have to use a remote.

any help on how to-do this would be appreciated.

Code for Textbox

local textBox = script.Parent

local function onFocusLost(enterPressed)
	if enterPressed then
		
	end
end

textBox.FocusLost:Connect(onFocusLost)

just use a remoteevent and when firing to the (server I’m assuming) just do

remoteevent:FireServer(textbox.Text)

then, on the server side do

remoteevent.OnServerEvent:Connect(function(player, playertext) -- Always put player as the first argument when doing a OnServerEvent
surfacegui.textlabel.Text = playertext
end)

Yeah worked, thanks so much.
Its basically for inputting coords into a system for a TARDIS. easier to allow players to input data from their keyboards then having a gui keypad

1 Like