collisionPoint = object.PrimaryPart.Touched:Connect(function() end)
collisionPoints = object.PrimaryPart:GetTouchingParts()
-- Checks if there is collision on any object that is not a child of the object and is not a child of the player
for i = 1, #collisionPoints do
if not collisionPoints[i]:IsDescendantOf(object) and not collisionPoints[i]:IsDescendantOf(character) then
setCurrentState(3)
break
end
end
collisionPoint:Disconnect()
return collided
Can someone please help. My brain is not functioning. Basically how do I make it so if there is a Humanoid like other humanoids and not just the Character itself. Because I don’t want that to become a boundary. I want to make it so lets say I have an NPC walking around and the Player wanted to place something. I don’t want the NPC to be preventing you from placing the object other wise if I have too many NPC game will be impossible to build.