How do I detect is a player **Isnt** touching a part anymore?

Hello, how would I go about detecting weather a player isn’t touching a part anymore?

1 Like

https://developer.roblox.com/en-us/api-reference/event/BasePart/TouchEnded

You can use the following code:

part.Touched:Connect(function(hit)
    -- Code runs when part is touched
end)

part.TouchEnded:Connect(function(hit)
    -- Code runs when part is no longer being touched
end)
1 Like

Ok, so I found the solution,
So
When the player touches a part, it will trigger a while true do loop on the client detecting if the part is touching the player anymore. (Using get all touching parts)