I’m making a carry system for my game but I stumbled upon an issue. Basically sometimes the carrier would get sunk in the ground for no reason at all and I have no idea why.
Here is how it looks like:
script that is responsible for welding the players together:
function DownedFunctions.weldPlayers(origin ,carry)
local ro,rc=origin.Head,carry.PrimaryPart
local w=Instance.new("Weld")
w.Name="CARRYWELD"
w.Part0=rc
w.Part1=ro
w.C1=CFrame.new(0,0,1.75)
w.Parent=rc
for _,Part in pairs(carry:GetChildren()) do
if Part:IsA("BasePart") then
Part.CollisionGroup = "DownedPlayers"
Part.Massless = true
end
end
for _,Part in pairs(origin:GetChildren()) do
if Part:IsA("BasePart") then
Part.CollisionGroup = "DownedPlayers"
end
end
end
I think you mean what they can collide with? In that case they can’t collide with their collision group or the “Players” collision group but they can collide with the default group
You may want to set their state to “physics” then. I’m assuming the reason your character is being pushed into the ground is because of the humanoid physics being applied on the character the player is carrying. Setting it to physics should cause them to behave like regular roblox parts, with no influence from the humanoid.