HumanoidRootPart detaching from the rest of the model

this problem is not mine, but from a friend of mine (@FelipeM0609 ) just pretend im him:
Im working on a tower defense game, if I load in late/when the game starts lagging due to massive quantities of enemies the entire model of an enemy gets detached from the HumanoidRootPart that im moving the enemies with. I tried the system with a normal one part brick and it worked fine which leads me to believe its some sort of a failure with loading Motor6 joints.


script responsible for spawning enemies

Have you tried using the line of code

part:SetNetworkOwnership(Player)
1 Like

I think setting it to nil makes more sense (automatically changes to the server)

1 Like

“What do I specifically set the ownership of? Both the model and humanoid root part say that its not a valid member of them”

It’s a function, not a variable/property. Set this code right under where you clone the enemy. Usually you set the PrimaryPart to the server
Edit: remove the ship, i thought it was written like that but apparently not but the fixed version is the code snippet

Enemy.HumanoidRooPart:SetNetworkOwner(nil) -- or just PrimaryPart instead of HumanoidRootPart
1 Like

The usage of SetNetworkOwner is impossible do to the humanoidrootpart being anchored
its also needed to be anchored regardless due to the usage of tweens

You have to rig your mob. I recommend you using RigEdit Lite. If you rigged everything correctly, you can set the HumanoidRootPart to unanchored

1 Like

I’ve received the same error from one of my clients and they had to make an entirely different model with lesser number of constraints, welds and etc. Try matching your model to a r6 dummy from the toolbox. In this way, you can get to know about welding parts to which and their properties so as to resolve your issues.

When my client had sent his model, it had too many unnecessary weird looking constraints, possibly around 200 of them. Maybe this gets added when you’re animating the same model and then using it for game henceforth, all instances cloned while animating remains in model making it lagging and heavy CPU consumption for the player’s device.

Another reason can be of the way you’ve implemented PathFindingService or Moveto() function in the script. Some error in them can cause immense lag into your game. If you have used PathFindingService, you can refer to this iframe :

Kindly crosscheck if your code matches with the above if you used ONLY PATHFINDINGSERVICE

1 Like

tried using the roblox r6 rig/the one found in the toolbox, both have the same issue as my enemy model. I tried disabling the animations but the issue is the same for unanimated enemies except for them spinning less and being in a perfect straight line with the root. For my movement system I use tween not roblox pathfinding or MoveTo() as both are pretty terrible and unoptimised

Then the issue will be of your scripts. Use PathFindingService as I’ve above mentioned in the iframe.