I cant use any oth those cause touch interest dont always get the person if the block is anchored and cancollide = false and cant use :gettouchingpartsa cause i want the part to becancollide = false
You could listen for the Touch
and TouchEnded
events, adding each part added to a weak-keyed dictionary (so that it won't keep Destroyed parts in memory), like so:
local part = script.Parent local parts = setmetatable({}, {__mode="k"}) part.Touched:Connect(function(p) parts[p] = true end) part.TouchEnded:Connect(function(p) parts[p] = nil end)
I sometimes find that TouchEnded won't fire properly, which means you should improve the script to automatically remove a part from parts
if it moves some distance away.