Good afternoon!
I’m almost finished making a carry system, and while it worked perfectly in 2-player testing, the moment I try it in 3-player testing it malfunctions, and lets the carrier pick up any amount of players, and one player is left frozen on the carrier.
Basically, when the carrier picks someone up an enemy, the string value inside the carrier turns into the enemy’s name. I also have a ‘carrying’ and 'pickedUp’ boolValue inside every character, to try and make sure the carrier doesn’t pick up more than 1 person. Here is the part in my script which picks up and drops a player.
pick up player script
game:GetService("ReplicatedStorage"):WaitForChild("AttemptPickup").OnServerEvent:Connect(function(carrier, str)
local collectionservice = game:GetService("CollectionService")
local carrierCharacter = carrier.Character
local nametag = carrierCharacter:FindFirstChild("Carrying"):FindFirstChild("enemyname")
if str == "pickup" then
if nametag and nametag.Value == "" then
if carrierCharacter:FindFirstChild("Carrying").Value == false and not carrierCharacter:FindFirstChild("deb") then
local debounce = Instance.new("StringValue", carrierCharacter)
debounce.Name = "deb"
game:GetService("Debris"):AddItem(debounce,0.4)
--player loop
for i, player in pairs(game:GetService("Players"):GetPlayers()) do
if player ~= carrier then
if (carrierCharacter.HumanoidRootPart.Position - player.Character.HumanoidRootPart.Position).magnitude < 7 then
-- check if downed and k.o
if player.Character:FindFirstChild("Humanoid") then
if player.Character:FindFirstChild("HumanoidRootPart") then
if player.Character:FindFirstChild("K.O").Value == true then
if collectionservice:HasTag(player.Character:FindFirstChild("Humanoid"), "knocked") then
nametag.Value = player.Name
--pick up player
drop player script
elseif str == "drop" then
if carrierCharacter:FindFirstChild("Carrying").Value == true and nametag and nametag.Value ~= "" then
local enemyplayer = game.Players:FindFirstChild(nametag.Value)
if enemyplayer then
if enemyplayer.Character and enemyplayer.Character:FindFirstChild("K.O").Value == true and enemyplayer.Character:FindFirstChild("Carrying").PickedUp.Value == true then
local enemy = enemyplayer.Character
enemy:FindFirstChild("Carrying"):FindFirstChild("PickedUp").Value = false
--dropping script