Issue with welding NPCs to player

and @Scottifly to answer you, yes I did put NPC parts to Massless.

Ok, it seems the issue isn’t over, and that controlling mass was only part of the solution. it was late at night and this glossed over me. So the issue still remains the same, but there were two ways to solve it:

  • Increase Scale of the player character, no issues further
  • Increase Density of player RootPart, BUT you must reset, and all current NPCs will no longer have the issue. Any NPCs spawned in after you reset will continue to have the issue.

I would definitely prefer finding a solution where I do not need to increase the player character Scale.

2 Likes

I thought I saw a while back that changing properties on a humanoid had to be done every frame otherwise they reset. I could be wrong.

You can check easily by looking at the NPC part densities while you are testing the game in Studio.

2 Likes

Gave it a shot, sadly didn’t change anything.

Also printed densities/masses of entire NPC, and it’s consistent that the player Character mass is much higher than NPC mass.

3 Likes

You can manipulate character reset time to 0 seconds to do this. It sucks that you have to but yeah basically if your mass is the same as the NPC it requires death and on the 2nd time you weld to the NPC, your player will have control over the NPC

I could help if you dm an rbxl file with a baseplate, the two npc’s and the scripts that are having the issue

Not at all true as long as they have bigger mass before the welding occurs it works. This is what exploiters used to do with tool kill and tool void. They would make themselves bigger right before attacking their victims

Nope it doesn’t work because if it did that would have been anti tool kill and anti tool void. I’ve tried making all baseparts inside the entire game set to massless and even when you do that, tool kill and tool void still has ownership over you because the massless property doesn’t have an affect on network ownership with welds

This unfortunately didn’t work as well. Do you know why a death is required for this to work?

1 Like

I am not comfortable with sharing files and scripts just yet.

However, I have come up with a temporary solution, where I just set the RootPart CFrame on the NPC every frame, acting as a not-so-rigid weld. I will leave this thread open to further have discussions about this specific problem, as this is an interesting problem I would like to solve.

Here’s a thought, are you using scripted Welds, WeldConstraints, or Motor6Ds?

I don’t know if the differences between these 3 would have any affect, I’m just guessing at this point. Maybe @deiuxor (Why does your @ need an i in it instead of an l?) has some input on the differences between the 3.

1 Like

I’ve tried all 3 of these already. It all boils down to network ownership so unfortunately trying to use any of these to fix this won’t work

I understand. I’ll open up my tool kill game and see what I find. I’ve never tried to tamper with this in any other way besides just directly scaling the character’s to be bigger but I’ll get back to you if I find any other solution. If you don’t hear back from me, it means I wasn’t able to find a different solution

Yeah it’s just how the network ownership works. When your mass is identical to your victim you only claim ownership on the 2nd try not the first, but as long as your mass is just very slightly bigger, you can claim it on the 1st try.

No more need for this. After an hour of testing I was able to achieve ownership over the NPC with a very nice solution :blush:


game.Players.PlayerAdded:Connect(function(player)

player.CharacterAdded:Connect(function(character)

local hrp = character:FindFirstChild("HumanoidRootPart")

if hrp then

hrp.Size = Vector3.new(2, 2.01, 1) --Sets the root part size slightly bigger than the NPC so that you always have ownership on the first try

end

end)

end)

You might need to switch your game to R6 for it to work but it’s the best solution without a doubt and it requires the least amount of character manipulation

1 Like

@JexyJacy Did you try the solution I provided? I would appreciate if you could mark my answer as the solution if it works. Thank you! :slight_smile:

1 Like

Sorry for the late reply, but this worked! Thank you again for your help!

1 Like

You’re very welcome! You need to set the player’s root part to always be slightly above the NPC at the time of welding. A more optimized way to do this is writing code that does it right before welding instead of having their root part always bigger. A way you could do this would be like this.


local OriginalSize = hrp.Size

hrp.Size = Vector3.new(NPC.root.Size, NPC.root.Size + 0.01, NPC.root.Size)

--and then right after you've finished the attack

hrp.Size = Vector3.new(OriginalSize)
1 Like