Moving with CFrame or changing the position of a part so that it hits another part will not trigger the Touched event. (Shown below)

Is there an alternative solution to what I'm trying to do, or a workaround?

part1 = Instance.new("Part")
part2 = Instance.new("Part")
part1.Anchored = true
part2.Anchored = true
part1.Parent = workspace
part2.Parent = workspace

part2.CFrame = CFrame.new(5, 0, 0)

part1.Touched:connect(function(hit)
	hit:Destroy()
end)

while wait(1) do
	part1.CFrame = CFrame.new(0, 0, 0)
	wait(1)
	part1.CFrame = CFrame.new(5, 0, 0)
end

2 comments

2

Use the GetTouchingParts method

0

Please put [SOLVED] in your title instead of answer so it can be correctly marked by the system.