Basically, I want to connect a function to child removed event like so
local folder = workspace.Folder
local function onRemove(itemRemoved)
-- how can i get the folder that the item was removed from?
end
folder.ChildRemoved:Connect(onRemove)
I want to write a function once and connect it to many different folders; however, I don't know how to access the folder because i cant do
local function onRemove(itemRemoved)
itemRemoved.Parent
end
because the itemRemoved has had its parent changed.
Does anyone know a way to get the parent it was removed from without doing an anonymous function?

6 comments
All functions in lua are anonymous. They don't have names
No. That's merely its variable that references it.
Okay, my apologies. Well is it possible a referenced function
https://gyazo.com/40cf81b16da8f535510f80617d13e8fc
Okay, I figured out what i can do. When this event is fired, I just run a different function inside of that one.
ok