Roblox Script Understanding Touched event

• 1 min read

This is a very basic script to understand the Touched event of any object.

Attach this script to an object:

local function onTouch(part)
	print("Touched by", part)
end

script.Parent.Touched:Connect(onTouch)

Whenever an object touches this, the print function will be executed showing that object.