A proper way to make the player carry a model

I’m trying to make a carrying script, I want it to be something like this


So I welded every parts in the model and wrote this simple script:

local humanoid = player.Character:WaitForChild("Humanoid")
local animationTrack = humanoid:LoadAnimation(script.Animation)
animationTrack.Looped = true
animationTrack.Priority = Enum.AnimationPriority.Action	
animationTrack:Play()
local hmr = player.Character.HumanoidRootPart
for i,v in pairs(bit:GetDescendants()) do
	if v:IsA("BasePart") then
		v.Anchored = false
		v.CanCollide = false
	end
end
bit.LevitateScript.Disabled = true
while true do 
	bit:SetPrimaryPartCFrame(hmr.CFrame+hmr.CFrame.lookVector*3)
	wait(0.005)
end

But it didn’t turn out so well, It flings the model like this:
https://gyazo.com/0e313811e75a9cceecf55425a72dbfbb
I was very confused because there were no errors in output, so I tried another way which is welding Bit (the model) to player’s torso.

local humanoid = player.Character:WaitForChild("Humanoid")
local animationTrack = humanoid:LoadAnimation(script.Animation)
animationTrack.Looped = true
animationTrack.Priority = Enum.AnimationPriority.Action	
animationTrack:Play()
local hmr = player.Character.HumanoidRootPart
bit:SetPrimaryPartCFrame(hmr.CFrame+hmr.CFrame.lookVector*3)
for i,v in pairs(bit:GetDescendants()) do
	if v:IsA("BasePart") then
		v.Anchored = false
		v.CanCollide = false
		local weld = Instance.new("Weld")
		weld.Parent = player.Character.Torso
		weld.Part0 = player.Character.Torso
		weld.Part1 = v
	end
end

It kinda works but the model is completely deformed.
https://gyazo.com/1154e2f64511036aae8a56b5d7e2a3fb
I am frustrated and tired, I can’t find any suitable solution on DevForum/other websites.

1 Like

Why not try making it a tool?
30char

move all the model infront of the player then use a for loop to weld all the parts to the HumanoidRootPart

I did that already, it will cause the model to deform

Doing this with a single part or a mesh would be much easier, but you can also weld (using the new weld constraints) all of the parts to a single root part and then only move the root part. All the parts that are welded to the root part should be unanchored.

ok sir, I’ll try it right now.

So what I need to do is, weld all the parts in my model to a single part, then move that single part to the front of the player and then weld it to the player’s humanoid root part?

Yes, weld all of the parts (using a WeldConstraint) to a single part, make sure all of the welded parts are unanchored, and then only manipulate the main part.

It didn’t cause the model to deform, but after I weld the primary part to the player, the player will not be able to move like this.
https://gyazo.com/f0755ac9c1af327a90b2c02e795cf598

Make sure you unanchor the main part as well once you pick it up. For best effect, make sure that all of the “Massless” options are checked in the properties.

Thank you so much sir, it works as I expected now, but there’s a little problem. The positioning of the model is incorrect.
https://gyazo.com/3917acc88034d74ab7b482c021308d01
This is the code I wrote for positioning:

bit.Screen.CFrame = hmr.CFrame + hmr.CFrame.lookVector

You’ll have to experiment with what’s right for you, but you’ll have to multiply the lookVector by something in order to move it forwards.

Alright, thank you so much for helping me :smiley:

1 Like

No worries, I’m glad I could help!