I'm trying to make a hit detector. The thing is, when a part is in the it doesnt work (I know this from trying to print("touched") or stuff like that.) The region is approximately a 4 x 10 x 20 cube. I've also tried removing the while loop and even copied directly from the WIKI.
local Point1 = script.Parent.Part1.Position
local Point2 = script.Parent.Part.Position
local Region = Region3.new(Point1,Point2)
while wait() do
for _,Part in pairs(game.Workspace:FindPartsInRegion3(Region,nil,100)) do
if Part.Name == "wall" then
print("get out front")
break --I've tried removing this too just in case this got in the way.
end
end
end
