Detecting when a object gets added to a folder

Hello, I’m making a game and I’m wondering how you would detect an object going into a folder. The context is that I’m trying to make an inventory folder and want to detect if an object gets inserted into the folder, this will then give the character a weapon. Without using Roblox’s tool system. How would i achieve this?

4 Likes

Hi.

There is an event called ChildAdded, wich all instances have

You could do something like this:
Folder.ChildAdded:Connect(function(child)
—do stuff
end)

The added children instance is passed as an argument into the function

2 Likes

Thanks this will help :slight_smile: