Really random question

  1. What do you want to achieve? You input text in one box, press a button and the words of the input text pop out one after another very fast in the output box

  2. What is the issue? I dont know how to get the single words. I can only get the full text

  3. What solutions have you tried so far? I asked some friends but we werent able to come up with any ideas and on the internet i couldnt find anything. Well it does sound like a really random question

local player = game.Players.LocalPlayer
local playergui = player:WaitForChild("PlayerGui")
local ScreenGui = playergui:WaitForChild("ScreenGui")
local frame = ScreenGui:WaitForChild("Frame")
local ImageButton = ScreenGui:WaitForChild("ImageButton")
local Input = ScreenGui:WaitForChild("Input")
local Output = ScreenGui:WaitForChild("TextBox")
local Text = ScreenGui:WaitForChild("TextLabel")

function abc()
	Output.Text = Input.Text
end

ImageButton.MouseButton1Click:Connect(function()
	abc()
end)

Have you tried using string.split? It can help you seprate entire text to portions.

[If I understood your issue correctly].

1 Like

alright thanks. All i needed was to know which function could potentionally help me. Ill research string.split a bit

1 Like

No problems,

Briefly, string.split will return you a table, so here is an example:

local Text = "Hey Guys"
local Split = Text:split(" ")

print(Text:split(" ")[1]) --> would print "Hey"
print(Text:split("/")[1]) --> wouldn't work because there is no '/' in your text"

If it helped, make sure to mark it as the solution , so people know it’s been solved :wink:

1 Like