Why doesn't this run forever?

I’m trying to make a print loop without using ANY methods of looping but it only prints once. How do I make it run forever?

local D 
function Check(Child)
	if tostring(Child):match(Child.Name) then
		print(tostring(Child))
		D = Child
	end
end
workspace.ChildAdded:Connect(function(Child)
	if tostring(Child):match(Child.Name) then
		print(tostring(Child))
		D = Child
	end
end)
game:GetService("LogService").MessageOut:Connect(function(Message)
	if Message == tostring(D) then
		Check(D)
	end
end)

What’s this for and why don’t you want to use a loop?

I’m trying out LogService.

you can use recursion. You just need to call the function inside itself

Something Like this

function Check(Child)
	if tostring(Child):match(Child.Name) then
		print(tostring(Child))
		D = Child
	end
	Check(Child) -- call the function again
end


Now I have to deal with this.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.