Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
6

Why Is This Carry Causing Players To Act "Heavy"? [closed]

Asked by
H26O 44
3 years ago
Edited 3 years ago

I'm trying to create a system where you can pick up players and carry them around but I'm running into the issue where it seems players almost weigh down each other and I'm not quite sure why. It seems to work fine for Player2 but Player1 has an issue carrying people.

I'm currently welding the players together using a single weld and I've tried setting the network owner of the targets primary part to that of the person carrying them and also have tried setting the player to mass less, neither seemed to work. This is the first time I've tried to create a carry system any ideas what I could have done wrong?

Gifs of the Issue:

Gif 1 (How its intended to work)

Gif 2 (The issue that occurs)

Target is the person that's being carried

target.PrimaryPart:SetNetworkOwner(plr)
target.Parent = plr.Character
target:FindFirstChild("Humanoid").PlatformStand = true
target:FindFirstChild("HumanoidRootPart").CFrame = plr.Character:FindFirstChild("HumanoidRootPart").CFrame * CFrame.new(-0.5,2.8,0) * CFrame.Angles(1.55, math.rad(0), math.rad(90))
local carryWeld = Instance.new("WeldConstraint", plr.Character)
carryWeld.Part0 = plr.Character:FindFirstChild("UpperTorso")
carryWeld.Part1 = target:FindFirstChild("HumanoidRootPart")
0
Can I see your script? I think I know what the problem could be, but I'm not entirely sure without seeing how you handle the players. SteamG00B 1633 — 3y
0
Have you tried using WeldConstraints instead of Welds? brokenVectors 525 — 3y
0
I added the code to the question and also I tried using WeldConstraints instead but seemed to end in the same result H26O 44 — 3y

Locked by JesseSong

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

1 answer

Log in to vote
1
Answered by 3 years ago
Edited 3 years ago

What's happening?

if you know a bit about physics, the gravity (force) being pulled on the player is it's weight times the gravity

return target.HumanoidRootPart:GetMass() * workspace.Gravity

In this case the player thats holding the other player will experience the force two times as much as they normally would.

I know this is nothing to do with your code but this can be used in many ways from making a bodyforce and setting its force to that code above and the player would stay still you could also add a bit more force and make the player float!

How do you solve it?

In every object, meaning everything in the workspace has an property (boolean) called Mas-less, which determines if the selected object should have mass or not have mass. If you read my thing about why it happens you should set the HumanoidRootParts massless to false doing so;

target.PrimaryPart:SetNetworkOwner(plr)
target.Parent = plr.Character

target:FindFirstChild("Humanoid").PlatformStand = true

target:FindFirstChild("HumanoidRootPart").CFrame = plr.Character:FindFirstChild("HumanoidRootPart").CFrame * CFrame.new(-0.5,2.8,0) * CFrame.Angles(1.55, math.rad(0), math.rad(90))

local HumanoidRootPart = target:FindFirstChild("HumanoidRootPart")

local carryWeld = Instance.new("WeldConstraint", plr.Character)
carryWeld.Part0 = plr.Character:FindFirstChild("UpperTorso")

carryWeld.Part1 = HumanoidRootPart


if HumanoidRootPart.Massless == false then
        HumanoidRootPart.Massless == true
end)

And of course when the player gets put down set the massless to false again, otherwise it will trigger a lot of problems. I've tried these carry simulators before xD

Ad