Welding two characters together... ignores massless?

Hello wonderful devforum people!

I’m helping my friend get some of the systems in their game started off. For context, if you know what JoJo’s is this will be a simpler read, but if you don’t then just remember that the use of “Stand” just represents the NPC that I’m trying to weld to the player.

Anyway! My goal going in was for animations with the player and their Stand to be independent from each other. I also wanted the player to spawn in with their Stand always connected to them, so this script serves solely to weld their Stand to them. The way I accomplished this was the only way that made sense: welds, and in this case rigid constraints, which both got me the same bugged-out result…

In StarterCharacterScripts:

--// Variables
local rs = game.ReplicatedStorage
local standbase = rs:WaitForChild("StandBase")
local char = script.Parent
local plr = game.Players:GetPlayerFromCharacter(char)

--// Functions
function InjectStand()
	local charstand = standbase:Clone() -- copying the stand uniquely
	charstand.Name = (char.Name.."Stand")
	charstand.Parent = char
	
	local standroot = charstand.HumanoidRootPart
	standroot.Anchored = false
	standroot.CFrame = char.HumanoidRootPart.CFrame
	
	local rigid = Instance.new("RigidConstraint") -- establishing the constraint itself
	rigid.Name = "StandRigidConstraint"
	rigid.Parent = char
	rigid.Attachment0 = char.HumanoidRootPart.RootAttachment
	rigid.Attachment1 = standroot.RootAttachment
end

InjectStand()

This is a remarkably simple script, and I wasn’t expecting to have to troubleshoot it. But it seems that the problem lies with a core part of the Roblox engine. For some reason, when you have two characters welded together, they completely ignore the Massless property which, in this case, means that my player is very weighed-down and slow. CustomPhysicalProperties “Density” set to zero achieves an identical result as well.


I searched for solutions on the devforum, and most of these cases came up with no solution or a solution that just didn’t work at all in my case.

For example, in an old devforum post (that for some reason I can’t find right now) the solution to the massless issue was apparently changing the root part’s name… I tried changing part of the code to this.

local standroot = charstand.HumanoidRootPart -- need a var bc of what we're bout to do
	standroot.Name = "_HumanoidRootPart" -- ro engine gets confused with connected humanoids so we use a hacky fix???
	standroot.Anchored = false
	standroot.CFrame = char.HumanoidRootPart.CFrame

Same result, so I didn’t keep this.

If anyone could offer some pointers, troubleshooting options, or solutions of any kind I would be very grateful. Thank you!

Have you tried changing root priority?

Just now I tried messing around with the root priority of the template in replicated storage. None of the changes I made altered the result at all, and even when I tried changing my own root priority or doing the same thing after the playtest had started/through a script, nothing changed.

It could be that I just don’t understand how root priority works, because from the documentation and its relation to Massless it seems very relevant to my problem. Is there a specific change to it to make that I could have overlooked?

I played around with AlignPosition and AlignOrientation, as well as collision groups, and I have found a solution.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.