PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience

Jul 24 2018, 1:33 PM PST

-- 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)