I’ve actually added this in my game!
First, we will have to get the player (i know you already made that but my carry script works with a function)
local function getplr()
local magn = 4.5
for _, guy in pairs(workspace:GetChildren()) do
if guy == nil then return end
if guy:FindFirstChild("Humanoid") and guy:FindFirstChild("HumanoidRootPart") and guy ~= Player.Character and magn > (guy:FindFirstChild("HumanoidRootPart").Position - Player.Character.HumanoidRootPart.Position).magnitude and guy:FindFirstChild("HumanoidRootPart"):FindFirstChild("alabo") == nil then do
if guy:FindFirstChild("Humanoid").Health == 0 then return end
local humz = guy:FindFirstChild("Humanoid")
local horp = guy:FindFirstChild("HumanoidRootPart")
end
return guy
end
end
end
Then, we will have to weld the players.
local function weldPlayers(origin,carry)
local ro, rc=origin.HumanoidRootPart,carry.HumanoidRootPart
carry.Humanoid:ChangeState(Enum.HumanoidStateType.GettingUp)
carry.Humanoid.PlatformStand = true
local w=Instance.new("Motor6D")
w.Name = "carryweld"
w.Part0 = ro
w.Part1 = rc
w.C1 = CFrame.new(-2, 0, 0)
w.C0 = CFrame.new()
w.Parent = rc
for _,v in pairs(carry:GetChildren()) do
if v:IsA("BasePart") then
v.Massless = true
end
end
end
We will also need a fuction so you can drop them.
local function restorePlayer(plr)
plr.Humanoid.PlatformStand = false
plr.HumanoidRootPart.carryweld:Destroy()
for _, v in pairs(plr:GetChildren()) do
if v:IsA("BasePart") then
v.CollisionGroupId = 0
v.Massless = false
end
end
end
Now I think you know how to make it up together and make it work. How I did it was I made a variable called “Carry” and set it to false and when you press v it turns to true and it runs the function weldPlayers(player.Character, carried), I got the carried variable by doing local carried = getplr(), then if you press v again it turns “Carry” to false and runs the function restorePlayer(carried). (Its all done in a server script)
Good luck and let me know if there are any errors!
(Also, you will need to put an animation to play for both your player and the character)