I have a temporary model that follows the players cursor. When the player tries to place this temporary part I try to do a check to see if the TemporaryPart is touching the Baseplate or Terrain.
The problem that I’m having is I cant seem to get a table of the parts touching the TemporaryModels PrimaryPart. At the very least the other parts in the model touching the PrimaryPart should be in the table but they are not.
I have no idea why this table always returns with nothing. Any solutions or potential feedback would be appreciated. Thanks in advance.
--Code snippet
local touchingParts = Temporary_Model.PrimaryPart:GetTouchingParts()
local partsTable = {}
for _, part in ipairs(touchingParts) do
table.insert(partsTable, part)
end
if #partsTable > 0 then
for a, b in ipairs(partsTable) do
print(b)
end
else print("no parts in table!")
end
[[-----OUTPUT-----
20:32:54.083 no parts in table! - Client - LocalScript:343
]]