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 turn this to a touched function?

function lightOnFire()
	print("Lighting on fire!")
end

1 answer

✓ Accepted answer

I essentially answered this in your last post

Part.Touched:connect(function(touchedPart)
	print(touchedPart.Name) -- This is what I wrote before.
	print("Lighting on fire!") -- This is what you wanted... Not very hard to change.
end)

Alternatively, you can write this:

local function lightOnFire(touchedPart)
	-- Do your thing.
end

Part.Touched:connect(lightOnFire)

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