I have already been able to successfully weld single parts or unions to a player, but how would I go about welding an entire model to them? If this is able to be done easily enough, is it also possible to have the model maintain an intended orientation?

The following is a script I have been using for parts, but it doesn't work for whole models:

local part = script.Parent

function onClicked(plr)
	-- creating welded parts
	local backpack = game.ReplicatedStorage.pack:Clone()
	local partB = backpack.MainPart

	partB.Parent = plr.Character

	--  creating welds
	local weld1 = Instance.new("Weld")
	
	-- setting up what the welds attach
	local partA = plr.Character.UpperTorso
	weld1.Part0 = partA
	weld1.Part1 = partB
	
	--[[ these settings will hold tight 2 parts together
	   but if the size are equal, you will probably want
	   a offset between each right? C0 is the offset
	   relative to Part0 (partA) and C1 Part1 (partB) example:
	--]]
	weld1.C0 = CFrame.new(0, 0, -0.5)
	weld1.C1 = CFrame.new(0, 0, 0)
	
	-- placing welds
	weld1.Parent = partA
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)

3 comments

1

Weld the model's parts to each other first and maybe have a primary part with a second weld attached to where you want it to be attached on the player's body part.

0

Can you ungroup a model with a script?

1

Don't think so, but you can always get all model children, move them to model's parent, and remove the model.