Get touching parts not working

What I’m trying to do is make it so that when the clickdetector is pressed, any player who is touching “Part1” will be teleported to “Part2” but nothing happens. All help appreciated!

	local parts = game.Workspace.Part1:GetTouchingParts()
	for _, part in next, parts do
		if part.Parent:FindFirstChild("Humanoid") then
			part.Parent.HumanoidRootPart.CFrame = game.Workspace.Part2.CFrame
1 Like

if the part is uncancollide then :GetTouchingParts() will not work on it unless you add a touchinterest which you also cannot create with, you must do the following if this is your issue

Part.Touched:Connect(function() end)
-- before :GetTouchingParts() is used

GetTouchingParts() doesn’t work on non-cancollide parts, which includes the legs of the players. It would be better to use a Region3 | Roblox Creator Documentation. You can create a region the size and position of Part1 with

local p = workspace.Part1.Position
local s = workspace.Part1.Size
local region =, p.Y-s.Y/2, p.Z-s.Z/2),, p.Y+s.Y/2, p.Z+s.Z/2))

and then detect parts within that region with Workspace | Roblox Creator Documentation

local parts = workspace:FindPartsInRegion3(region)

However, to answer your question about making GetTouchingParts() register on players you can look at this community resource. This is the same answer that @Synergious gave but remember to disconnect the Touched connection when you’re done to prevent memory leaks!


it does if you add a touchinterest, that’s when i stated add:

Part.Touched:Connect(function() end)

since it’s not creatable from, but it does just depend on what he is trying to do

1 Like

Id like to express my displeasure with learning the information that GetTouchingParts() will not activate with parts that have can collide turned off and will now cry for 30 minutes, good day.