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

Aug 29 2018, 6:22 PM PST

-- Destroys whatever touches the parent
-- Variable setup
local trap = 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
trap.Touched:Connect(onTouch)