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

How to make an input in TextBox be shown in a different text label?

hey! I am trying to make a 911 calling system. I am having trouble connecting the 911 UI to the 911 Dispatch UI. I want the information that the person write (EX: Location) to be shown on the dispatch ui. So for example if someone were to write their location at Civ Spawn and then they press SUBMIT I want the 911 dISPATCH UI to = what they put as the input..

does anyone understand? tysm

local label = script.Parent
label.Text = "Location:".."input from 911 system?"

2 comments

0

What I mean by this is if there was a question: Location? then you were to write down Beverly Hills as your location I want that information to sync over to the UI

0

i maybe can't help but put the space at the start at the 2nd string so it will be : Location input from 911 system? not Locationinput from 911 system?

1 answer

You can snap a .FocusLost event for a TextBox GUI Object to transfer it's contents via ensuring the provided EnterPressed Boolean parameter state is True.

local TextBox = --// Pathway
local TextLabel = script.Parent

TextBox.FocusLost:Connect(fuction(EnterPressed)
	if not (EnterPressed) then return end
	TextLabel.Text = TextBox.Text
end)

Use a RemoteEvent to fire to a ServerScript to send this change to all users through :FireAllClients(), or, you can use a BindableEvent to build communication between both LocalScripts if the TextBox is handled within a different program.

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