Follow up to previous problem with collectionservice

while wait() do
	local page = script.Parent:FindFirstChild("page")
	if page then
		local pages = page:GetChildren()
		for _, line in pairs(pages) do

collectionservice didnt work, as stated in my previous post, so i tried this

that is my code, the beginning of it, the part that is actually relevant
im making a death note, the layout is a frame (page) with multiple textlabels in them (finishedLine) with a textbox inside of each line (editableLine)
theres a starter page, and a stored page, when you hit “new page” it deletes the old page and clones the stored one, replacing the old page
the starter page and stored page are identical
this script is an effort to make it so every line is affected by this script
it works too, on the starter page? it errors and says "attempt to index nil with “FocusLost” and yet it works? but when i hit new page and write on the new page it doesnt work at all? and the script is not a child of page or anything its just in the ui so idk why this doesnt work

and this is the only script affecting them, so why does it work on one page but never on the new ones?

1 Like