So, I have this blood drip script where when the blood drip part gets touched, it waits a bit and anchors itself, and disables its collisions. It works like a charm, however, I wanted to add a feature for when it hits an object named “BloodPooled”, it will add size to it by a stud and delete itself.
Here is the code:
script.Parent.Touched:Connect(function(hit)
if hit.Name == "BloodPooled" then
hit.Size += Vector3.new(1, 0.001, 1)
script.Parent:Destroy()
else
script.Parent.Size = Vector3.new(1, 0.001, 1)
wait(1.5)
script.Parent.Anchored = true
script.Parent.CanCollide = false
script.Parent.Name = "BloodPooled"
script.Parent.Parent = game.Workspace.BloodPools
end
end)
Whenever it gets touched again, it just reverts back to the original size of 1, 0.001, 1.