Hi guys! I'm making a Bowling game, and I'm wondering how do you remove the pins when it falls down to the ground? I have this script where it says when it hits, it removes, but it doesn't when I go into Test Mode! Please help! I also have a Regen Button attached to it so I don't know what else to do.
if script.Parent.Name == "Pin" then
function onTouched(hit)
if hit.Parent.Parent.Name == "Pin" then
hit.Parent.Parent:Remove()
end
end
script.Parent.Touched:connect(onTouched)
function go()
wait(0.01)
script.Parent:remove()
end
end
script.Parent.Activated:connect(go)

1 comment
block code plz