Tiny gap in between parts

So, sometimes whenever I’m building I get these tiny little gaps between my parts, and it’s always stumped me because I don’t enjoy changing my studs to 0 just to get them to touch, or something else. I generally am consistent whenever I’m building, and whenever I switch my studs I make sure it makes sense (If I’m using 1 stud, I’ll switch between .25, .5, and 1), but at times I get these gaps and I didn’t know if there was a tip some of you guys knew in studio that could fix this without the use of plugins.

7 Likes

I get this issue a lot with weird additions of .005 to the position variables of parts. Open up the part’s properties and make sure the position is on a scale of the unit you’re using to move everything. There’s also a plugin called GridSnap that can really quickly snap selected objects to the unit you’re building on, removing those gaps.

6 Likes

Indeed, I’ve had this problem for quite some time. I usually end up working around it and/or redoing the process I took to get there to see if I had made any mistakes.

1 Like

I never really tried this before, but maybe you could try Gapfill? Here’s a link: https://www.roblox.com/library/165687726/Stravant-GapFill-Extrude-Fixed

1 Like

That plugin does not have anything to do with this issue.

This is caused by floating point inaccuracies in the building tools. A lot of the behavior is under the hood so exactly how to avoid this is hard to determine. Try only using increments that are powers of 2, like .125, .0625, .03125

2 Likes

I see. I misunderstood what he meant from this post exactly, I will take note. My bad.

1 Like

Hi please next time search for this before e.g.

However I’ve encountered this problem too, for me it happens when dragging parts around. A small fix may be to duplicate parts and move them with the move tools.

1 Like

From personal experience, I’ve found this bug happens mostly with moving a part rather than resizing, so when possible choose the latter.

If we’re on about the same thing, I’ve identified it as increment rounding, in which for some reason position values round to a 2dp degree of accuracy. If you have a part at Y 1.275 it may correct to Y 1.28, giving a 0.005 offset. This can easily be adjusted by viewing properties and editing the number back to what it should be, or using Stravant’s Resize Align

In short, Studio prefers an annoying precision and will adjust when changing a part with the drag handles, rotating or moving typically.

The post above links two previous posts with more likely more accurate descriptions or solutions to the problem, but I’m just speaking from my own experience.

1 Like

gapfil for something like that doesn’t work

i usually use 0.01 when that happens, but yeah it is pretty annoying

Try dragging the part around with the Select tool to align it with the placement grid (use 1 stud increments while doing this) then move it back in place and see if that works

Go to Properties, and type in what it reads there manually. Basically, the properties window rounds off really small numbers, so a part with positions 11.9995,0.9995,11.9995 reads as 12,1,12. Typing in the position 12,1,12 will correct it however.

If you have lots of parts where this is a problem, I’ve written an auto-rounding script you can use. Just paste it into the command bar!

--ROUNDPARTPOSITIONS MADE BY KONLON15, 11 MAY 2019

local floor = math.floor
local decimalPlacesToRound = 4 --You might want to adjust this.

local function round(num, decimalPlaces)
	local mult = 10^(decimalPlaces or 0)
	return floor(num * mult + 0.5) / mult
end

for i, v in pairs(workspace:GetDescendants()) do 
	if v:IsA("BasePart") then 
		local pos = v.Position 
		local roundedPos = Vector3.new(round(pos.X, decimalPlacesToRound), round(pos.Y, decimalPlacesToRound), round(pos.Z, decimalPlacesToRound))		
		v.Position = roundedPos
	end
end
8 Likes

Yes, I understand. My mistake.

Don’t use default building tools. A plugin like F3X Building Tools is fine.

(I know from experience I’ve never encountered this in F3X while I was building)

Thanks! This definitely helps a lot :smiley: