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

Tool ChildRemoved wont print?

I want this to print locally script in the tool, but it doesn't print at all probably because the tool gets remove before the script runs?

Tool.ChildRemoved:Connect(function()
	print("childgone")
	for _, i in pairs(work:GetDescendants()) do
		if i.Name == "DoorPrompt" then
			i.Enabled = false
		end
	end
	print("child2")
end)

1 answer

✓ Accepted answer

If you are deleting the tool then yes, the Local Script would be destroyed before it could output anything. I would recommend moving the Local Script to a different place. If you wanted to you could do script:Destroy() once the loop is done. I hope this helped! If it did please mark it as the answer. Good luck and if you need anything else just comment on this or if it doesn't work.

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