Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Is it possible to detect when a part is walked off of?

Is it possible to detect when a player gets of a part by means of jumping, walking off, etc?

1 answer

✓ Accepted answer

Use the Touched event in conjunction with the TouchEnded event:

local part = game.Workspace.Part

part.Touched:connect(function(hit)
	print(hit.Name.. " is touching ".. part.Name)
	part.TouchEnded:wait()
	print(hit.Name.. " is no longer touching ".. part.Name)
end)

1 comment

0

Thank you.

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