Hi ,
So, I want a part to drop only once when ever something touches it, but the part gets dropped 100 times. And I am using a Ontouched() function. Here is the code:
function onTouched(hit)
local partDrop = script.Parent
local part = Instance.new("Part",partDrop)
part.CFrame = partDrop.CFrame - Vector3.new(0,1.4,-1)
part.FormFactor = "Custom"
part.Size=Vector3.new(0.75,0.75,0.75)
part.Material = "Neon"
part.TopSurface = "Smooth"
part.BottomSurface = "Smooth"
part.CanCollide = true
print("Dropped!")
game.Debris:AddItem(part,math.random(2,5))
wait(6)
end
script.Parent.Touched:Connect(onTouched)
Thanks for Helping

2 comments
Thanks and does this work if the parent (part) is not collideable?
I think it does