You could create an invisible, non-collide-able area (part) that when touched would trigger code.
For example, you could use BasePart:GetTouchingParts()
(if you use this, then be sure to read this post: Simple trick to make GetTouchingParts work with non-CanCollide parts) or (simpler) BasePart.Touched:Connect()
(if you choose this, then make it like a pipe you fall through that runs the code so that you wouldn’t constantly have :Connect
requests being sent by anybody in the area).
CODE SAMPLE
for i,v in pairs(BasePart:GetTouchingParts()) do
-- run code
end
CODE SAMPLE
local function onTouched(Part)
-- run code
end
BasePart.Touched:Connect(onTouched)