Carrying players

What I am trying to achieve is: Lets say player1 and player2 are both under 15 health and they are both crawling (which I have already made) but player3 is going to carry one to safety.

I am not sure as to how I can pull this off, the reason is because I am checking for the “Torso” near the player and welding it to their hand when the InputBegan event fires, but there are multiple parts called Torso so I don’t understand how to define each individual torso without picking all of them up. Any suggestions?

I suggest instead of welding it to their Torso’s instead weld it to their HumanoidRootParts.

That’s not what I mean, I mean there are multiple parts in the game called “Torso” so how do I define each one?

Is their parent a player’s character as Roblox doesn’t add on default multiple parts in the workspace called “Torso”, if the parts are directly child of Workspace can you please provide screenshots.

They are not parented to the workspace, they are parented to players, would I get all the players in a variable and define all of the torsos?

something like this?:

local players = game.Players:GetPlayers()
local characters = players.Character or players.CharacterAdded:Wait()
local Torsos = characters:WaitForChild("Torso")

this is a table; you can’t just say:

instead I suggest using the following:

Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(char)
		-- here you got the character and player defined as: plr and char;
		-- now you can do:
		local Torso = char:WaitForChild("Torso")
		-- rest of the script here.
	end)
end)

Thanks! Now I understand this :slight_smile:

Sorry to bother, but I added your part to it and it still does nothing

local UIS = game:GetService("UserInputService")
local pTorso = script.Parent:WaitForChild("Torso")

game.Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(char)
		local Torso = char:WaitForChild("Torso")
		UIS.InputBegan:Connect(function(input, isTyping)
			if input.KeyCode == Enum.KeyCode.E and isTyping == false then
				if(pTorso.Position - Torso.Position).Magnitude < 3 then
				    print("test")
				end	
			end
		end)
	end)
end)

Does it print test though? Also, he is right. You should create a weld from the downed player’s humanoidRootPart to the carrier’s humanoidRootPart, make it so trollers can’t hold them for like an infinite time, make it so they have a limit of 30 seconds before the carried player drops down to the ground, it takes 5 seconds to recarry them again.

Also, change the angles in a way to make it look like the downed player is carried so it’ll look more fitting and “comfortable”.

Edit: Also, to prevent players like carrying downed players next to a wall, use raycast.