✓ Accepted answer
"So this is a serverscript inside of a part I have moving forward. "
You're most likely moving it forward with CFrame (correct me if i'm wrong). Well, as the wiki says, the Touched event won't fire if you're moving the part through something with CFrame. This is probably your problem.
You can use the method GetTouchingParts instead. This will return a table of all the parts that intersect with the part you called it on. It won't work for adjacent parts, only ones that intersect. It will also only work for parts that are CanCollide true.
Unfortunately, this isn't an event, so you'll have to use it in a loop. The best place would probably just be right after you move the part. Check out this simple script i just wrote:
local part = script.Parent
while wait() do
part.CFrame = part.CFrame * CFrame.new(-0.1, 0, 0)
for i, hit in ipairs( part:GetTouchingParts() ) do
print(hit)
end
end
4 comments
Why are you searching for a Humanoid, and why are you trying to affect the part's CFrame?
Wait showed wrong code hold on
There's the actual code Im really sorry
The script worked perfectly fine when I tested it in a game with a Baseplate and another part... Check to make sure the Disabled property of the script is unchecked, and make sure the script's parent is in fact the part that you want the parts it touches to be not Anchored and not Cancollide.