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)
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.