Why does my script detect a part inside of it when there isn't a part inside of it?

yep, still a gap… :frowning: lemme try even smaller

2 Likes

whats weird is that it used to work perfectly and now it doesnt. maybe roblox updated something with touching parts

2 Likes

The smallest it can get to is 0.001, since the actual decimal limit is 3 numbers.

2 Likes

Is there any other part inside the model or anything else?

3 Likes

there is a roof part, above it, but i deleted it and tried again and it still didn’t work so that isn’t the problem

2 Likes

Wait, so is the actual part a floor, table or what? Unless it’s a floor, it can have gaps. It’s natural.

3 Likes

its a floor, basically a foundation thing, like rust

2 Likes

Maybe make the hitbox have gaps, but after the placement, make the floor bigger.

This is how it can work, experimentally:

local part = Instance.new("Part", workspace)

while task.wait(0.05) do
    part.Size += Vector3.new(0.1,0,0.1)
end
--Increases in size time to time.
2 Likes

its ok, ill eventually find a solution for it, it’ll take time

2 Likes

If I do ever provide a message, you can mark solution in this message. I’ll still try to find what can work best.

3 Likes

Have you tried using WorldRoot:GetPartBoundsInBox() instead? You could set the CFrame to the part CFrame, but make the Vector3 size 0.01 smaller on each axis or something. It won’t affect the visible size of the block.

4 Likes

Could you give me an example code of how i would do this?

2 Likes

You can actually build in less than .001 studs. The display only reads the rounded off value of .001 studs.
Place 1 Part at Position 0,0,0 and set another one beside it so their corners match up exactly and zoom ALL the way in so you can see where the 2 edges meet. Now select the first Part, go to the Position Property and manually enter .0003 studs in the axis you want to see the movement. Hit enter, and in the viewport you’ll see the edge move .0003 studs. The value won’t change in the Properties Position value, but if you reenter the value as .0006 studs you’ll see the Part move a bit more and the displayed value will round up to .001 studs.

2 Likes

Try searching ‘building on a grid’ on the forums.
I just did and found this post about snapping items to a grid system that allows different sizes of blocks on a grid. Grid building different sizes

2 Likes

He tried 0.001 studs but didn’t work, there was still a “noticeable gap”?

2 Likes

Yes, there was still a gap :confused: I still can’t fix it

2 Likes