Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do i make a part whitch will be deleted after a player touches it whit the right tool?

I don't have any idea how do code this so i can't put some code here.I want make it so you can break down windows whit ur hands.

4 comments

0

make sure this code is inside a part: local part=script.Parent part.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("gear name here")~=nil then part:Destroy() end end)

0

Ok thank you

0

no problem, I am a good scripter who just helps people in his free time :D

0

Wait it doesn't seem to be working send it whit the answer and make it right cuz the long line of code won't help

1 answer

✓ Accepted answer
game.Workspace.Part.Touched:Connect(function(otherPart)
	if otherPart.Parent.Name == ' tool name here ' then
	script.Parent:Destroy()
	end
end)

1 comment

0

Thanks for the help I may even give you admin in my game who knows!

This discussion is preserved as it was. New answers, comments, and votes are closed.