So I’m working on a pirate game, And I want a ship to move on it’s own. So my solution to this was to anchor a single part of the ship model and tween it’s position, But soon I realized qPerfectionWeld unanchors all parts of the model, So I skimmed through the script trying to look for a fix and found this section:
local function WeldParts(Parts, MainPart, JointType, DoNotUnanchor)
-- @param Parts The Parts to weld. Should be anchored to prevent really horrible results.
-- @param MainPart The part to weld the model to (can be in the model).
-- @param [JointType] The type of joint. Defaults to weld.
-- @parm DoNotUnanchor Boolean, if true, will not unachor the model after cmopletion.
for _, Part in pairs(Parts) do
if ShouldBreakJoints(Part) then
Part:BreakJoints()
end
end
for _, Part in pairs(Parts) do
if Part ~= MainPart then
WeldTogether(MainPart, Part, JointType, MainPart)
end
end
if not DoNotUnanchor then
for _, Part in pairs(Parts) do
Part.Anchored = false
end
MainPart.Anchored = false
end
end
It mentions something about a MainPart, Though “MainPart” is not identified anywhere else in the script. It looks like I could change MainPart.Anchored = false
to MainPart.Anchored = true
if I could identify what the mainpart is/where the mainpart is. Any and all help would be appreciated
P.S. sorry if this is confusing, pls feel free to ask questions!