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

How to detect each line of a string? (SOLVED -by me-)

Working Code:

function GetLine(text)
	local words = {}
	local word = ""
	for i = 1, #text do
		local char = string.sub(text,i,i)
		if char ~= "\n" then 
			word = word..char
		else
			table.insert(words,#words+1,word)
			word = ""
		end
	end
	return words
end

Returns a full table so yeah lol.

1 answer

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