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 weld car parts together while keeping them smooth and with no outlines?

I'm trying to change the surface properties of the parts that make up a car to "smooth no outlines", but that overrides the welding system that was used to keep the car together. How do I remove the outlines from the car so it is smooth and keep the car from falling apart(welded) at the same time?

1 answer

Welds.

local BrickTable = {}
local Anchor = false

function RecursiveGeneric(Parent, Func, ClassLimit)
	for _, Child in pairs(Parent:GetChildren()) do
		if not ClassLimit or Child:IsA(ClassLimit) then
			Func(Child)
		end
		RecursiveGeneric(Child, Func, ClassLimit)
	end
end

RecursiveGeneric(
	script.Parent,
	function(Brick) table.insert(BrickTable, Brick) end,
	"BasePart"
)

local Base = BrickTable[1]
table.remove(BrickTable, 1)

for _, Part in pairs(BrickTable) do
	local Weld = Instance.new("Weld")
	Weld.Part0 = Base
	Weld.Part1 = Part
	Weld.C1 = Part.CFrame:inverse() * Base.CFrame
	Weld.Parent = Base
	Part.Anchored = Anchor
end

Base.Anchored = Anchor

2 comments

0

Giving people scripts is frowned upon. You're not helping them, you're giving them the answer. You're suppose to explain the script, if this is your script.

0

This is the script from the ITAAC, with the anchor variable.

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