A problem on making a carry system

Hello! I’m here today because I need help with my carry system. Works well with dummies, but when I try with players players just fall off the map. I tried NetWorkOwnerShip but it dont worked. Heres my code:

local RS = game:GetService("ReplicatedStorage")
local Activated = false
local FirstPlayerName = ""
local Character = script.Parent.Parent.Parent
local PhysicsService = game:GetService("PhysicsService")

local function OnClick(player)
if Activated == true then
if FirstPlayerName ~= player.Name then return end
local CharacterPlayer = game:GetService("Players"):GetPlayerFromCharacter(Character)
if CharacterPlayer then
CharacterPlayer.StatsFolder.CanAttack.Value = true
Character.PrimaryPart:SetNetworkOwner(CharacterPlayer)
end
Character:SetPrimaryPartCFrame(player.Character.PrimaryPart.CFrame + player.Character.PrimaryPart.CFrame.LookVector * 5)
Character.Humanoid.PlatformStand = false
for i,v in pairs(Character:GetChildren()) do
	if v:IsA("BasePart") then
        PhysicsService:SetPartCollisionGroup(v, "Default")
    end
end
script.Parent:Destroy()
else
if player.Name == Character.Name then return end
FirstPlayerName = player.Name
Activated = true
RS.Remotes.vfx:FireAllClients(16,Character)
wait(0.1)
Character.Humanoid.PlatformStand = true
Character.PrimaryPart:SetNetworkOwner(player)
for i,v in pairs(Character:GetChildren()) do
	if v:IsA("BasePart") then
        PhysicsService:SetPartCollisionGroup(v, "NonCollidable")
    end
end
local CharacterPlayer = game:GetService("Players"):GetPlayerFromCharacter(Character)
if CharacterPlayer then
CharacterPlayer.StatsFolder.CanAttack.Value = false
end
script.Parent.CarryWeld.Part0 = player.Character["HumanoidRootPart"]
script.Parent.CarryWeld.Part1 = Character.HumanoidRootPart
end
end

	                           
script.Parent.MouseClick:Connect(OnClick)

When you click at someone its supposed to you start carrying the player. And when you click again its supposed to you uncarry the player. Any help is welcome!

3 Likes

Where is this script located? (30 characters)

Inside the humanoid root part of who I should be able to carry

I’ve made it work, I cloned the character of who should be carried and the original parent set to replicated storage, and it works perfectly.

3 Likes

Can you show us your script if you carrying someone?

1 Like