How would I create a zone where when you drop an item it triggers an event?

So im trying to create a game similar to 99 nights in the forest and im wondering how would I create a system where when you drop an item in say a shredder, it triggers an event like incrementing a resource count or playing an animation? Ive tried something like comparing the distance of an item to the distance of the area that triggers the event, but im not sure how games like 99 nights does it.

GetPropteryChanged(“Parent”)

I think this topic has to move in Feedback and Help (Scripting Support)

idk how they do it, but the easiest way would probably be just to make a proximity prompt in the shredder that triggers the drop and event.

Can you elaborate? Not sure how checking if the parent changed works here.

Did a bit of research. Ill look into this solution.

hello copros.

Try ZonePlus+

You can use this module script so that when an item appears in a designated area, it’ll activate an event.

Example
local somePart = workspace.Ranalda
local itemToTrack = workspace.RanaldaHater
local Zone = require(game:GetService("ReplicatedStorage").Zone) -- Module script
local Area = Zone.new(somePart) -- New Zone

Area.itemEntered:Connect(function(item)
    print(("%s entered the zone!"):format(item.Name))
end)

Area.itemExited:Connect(function(item)
    print(("%s exited the zone!"):format(item.Name))
end)

Area:trackItem(itemToTrack)

also check out documentation

you could try the simplest solution and use hitboxes and parts with a touched event

Do you need to drop it in a specific mechanism? Because if so, you could use a ProximityPrompt, and check if the player is holding an item when the prompt is triggered to then perform the rest of the animations and statistic logic.

Otherwise, if you want them to be able to ‘enter’/‘drop’ something when standing within an area, there’s a few ways you can go about it.

  1. Have an invisible overlap part that encompasses the zone the player enters, then detect when the player enters it by using .Touched.
  2. Detect when the player presses the ‘drop’ input key and check if the player is inside a zone by using GetPartsInRadius or raycasting downwards to check if the player is standing on the area floor.