local partFind = game.Workspace
game.Workspace.barricade1remove.Touched:connect(function(hit)
if hit.Parent:FindFirstChild('Humanoid') then
wait(3)
partFind.BarA:Remove()
wait(3)
partFind.BarB:Remove()
wait(3)
partFind.BarC:Remove()
wait(3)
partFind.BarD:Remove()
wait(3)
partFind.BarE:Remove()
partFind.Wall:Remove()
end
end)
COMMUNITY QUESTION
How do i stop the script if the part is not touched anymore?
1 answer
Use the TouchEnded event and compare what has stopped touching it to what was touching it and see if they are the same object or child of said object.
This discussion is preserved as it was. New answers, comments, and votes are closed.
