Im trying to detect if a block is floating in the middle of the air and im using
GetPartBoundsInBox
local IsBlock = false
--pcall(function()
for i, HitParts in pairs(hitContents) do
if HitParts.Name == "Baseplate" then
IsBlock = true
--print(HitParts)
else
if HitParts.Name ~= "Block" or HitParts.Name ~= "HitBox" or HitParts.Name ~= "Invisi" then
print(hitContents)
IsBlock = false
--print(HitParts)
--print(SnapHRP)
else
IsBlock = true
print(hitContents)
break
end
end
--IsBlock = false
end
--end)
--print(IsBlock)
--wait(0.01)
if IsBlock == false then
Block:Destroy()
print("Not touching Eachother")
end
IsBlock = false
It returns This
[2] = Block,
[3] = Right Leg,
[4] = Left Leg,
[5] = Left Arm,
[6] = HumanoidRootPart,
[7] = Head,
[8] = Torso,
[9] = Handle,
[10] = Right Arm,
[11] = InnerHitbox,
[12] = HitBox,
[13] = HitBox
as you can see it say HitBox So it should be true but it isnt