We use cookies on this site to enhance your user experience

-- Destroys whatever touches the parent
 
-- Variable setup
local part = script.Parent
 
-- Gets an object to destroy
local function onTouch(objectTouched)
	-- Destroy objectTouched
	print("Something touched the trap part")
	objectTouched:Destroy()
end
 
-- Connects onTouch() to Touched event
part.Touched:Connect(onTouch)