Hi, i'm making a tycoon and i'm trying to work out how to detect the touching of two parts when the parts that the droppers dispense touch the collector at the end of the conveyor :/. I have tried .Touched, :GetTouchingParts, and looked endlessly at devforums and scripting helpers. I first tried this:
local Money = script.Parent.Parent.Parent.CashToCollect
local Debris = game:GetService("Debris")
for i,v in pairs(script.Parent:GetChildren()) do
if v.Name == "PartCollector" then
v.Touched:connect(function(Part)
if Part:FindFirstChild("Money") then
Money.Value = Money.Value + Part.Money.Value
Debris:AddItem(Part,0.1)
end
end)
end
end
There is a IntValue in each part that gets dispensed called 'Money'. The collector is meant to detect the part touching and find the IntValue and add it to another IntValue's Value. I then tried :GetTouchingParts and .Touched but this didn't work. Help please!

1 comment
this should be a comment tbh