For example when I am Using a on touch script like when I touch a part it deletes a specific part. Like if there is a jail cell and when I step On a a block it deletes the three bars how do I choose those three bars to be deleted in that script
COMMUNITY QUESTION
How do I choose a specific part to have deleted on touch?
1 answer
it will be something like
bar1 = location
bar2 = location
bar3 = location
touched = script.Parent(or location)
touched.OnTouched:connect(function()
bar1:Destroy()
bar2:Destroy()
bar3:Destroy()
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
You can group those bars into a model and use a for loop to either destroy each one or parent it to a place like ReplicatedStorage
not a request site, show some code before asking
I have Not tried this before so I dont Have a code and I am New to scripting sorry