Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I use welds better? Problem with alignment.

My welds are making the parts have offsets from the original build. What causes this? does moving the parts have anything to do with it? Although i have it weld then unanchor after the weld so I dont see why the positions of the parts are slightly off after the welds.

2 comments

0

what do you mean by offsets?

0

lets say two parts are next to eachother one at (0,0,0) and the other at (1,0,0) and after the weld ones at (0,0,0) and the other is at (1,0,.1)

2 answers

Line up the parts prior to welding them, when welding use a "WeldConstraint" which can be found by clicking the "+" icon by an item in the explorer.

local model = script.Parent


local function modelWeld(model,mainpart)
	for _,v in pairs (model:GetDescendants())do
		if v:IsA("BasePart")  then 
	    	local weld = Instance.new("WeldConstraint")
			weld.Parent = mainpart
			weld.Part0 = mainpart
			weld.Part1 = v
		end
	end
	
end

modelWeld(model,model.Grass2)

this happens within serverstorage before the model is copied. after it is copied it is unanchored but has parts that are in positions that weren't in the original

This discussion is preserved as it was. New answers, comments, and votes are closed.