I am going for a Monaco type theme, where I place a number next to the text to make referencing errors easier.
The reason I want to know is because I am making a game for beginner scripting, where you can join to learn the basics and try them yourself.
What I would personally do is to make a different TextBox for each line,place them in a Folder and use Folder:GetChildren()
to count the amount of lines with text in them.
Example:
local lines = script.Parent.Folder local count = 0 for _, line in pairs(lines:GetChildren()) do if line:IsA("TextBox") then if line.Text ~= "" then count = count + 1 end end script.Parent.LineCount.Text = tostring(count) end
Hope this helps!