all of my games that include a GetTouchingParts() are broken? Will this be fixed soon or should I build around it?
3 Likes
What parts exactly are you trying to get? If they’re non collidable (e.g. legs, arms) then it won’t work.
To get collidable parts:
local function GetTouchingParts(part)
local connection = part.Touched:Connect(function() end)
local results = part:GetTouchingParts()
connection:Disconnect()
return results
end
local results = GetTouchingParts(workspace.PartA)
print(#results) --> 1
This is not the problem. I checked my placement script, which uses gettouchingparts like this:
local connection = cloneModel.Hitbox.Touched:Connect(function() end)
local collides = cloneModel.Hitbox:GetTouchingParts()
connection:Disconnect()
for i, v in ipairs(collides) do
if v:FindFirstAncestor("Towers") or v:FindFirstAncestor("Obstacles") then
for i, v in ipairs(cloneModel:GetDescendants()) do
if v:IsA("BasePart") then
v.Color = Color3.fromRGB(255, 70, 38)
v.Transparency = 0.5
end
end
colliding = true
return
end
end
And it always returns an empty array.
It was previously a temporary issue: