Welding MeshPart/CSG to the character model can cause physics bugs

Unfortuantely this bug is not easily reproducable. I have been able to get it to occur consistently with parts that have custom collision (MeshPart and CSG), any other part class does not have this issue.

In my game I allow users to create “morphs” (models welded to the character to alter the appearance to a custom desire). I’ve found that while using morphs that are comprised of Unions or MeshParts, my character appears to jitter up and down for other clients, but on my screen it’s fine. This issue has only occurred with those part types. Additionally, the error only occurs sometimes. A repro will not be easy to create, but I will take the next bit of time to create one.

Repro: To do

If anyone else happens to use a system like mine, please tell me if you get these issues. I have checked my welding script and everything, and I know it’s not those especially because of the lack of this issue with standard primitives.

3 Likes

Followup: After asking around, it seems to be a replication issue according to what people are saying.

To test this, I asked users in-game if I appeared to jitter or bounce. Some said “No”, but some did see me with this weird bug. I decided to test it out.

The first test I did was to set my network ownership to the server:

for Index, Item in ipairs(workspace.Xan_TheDragon:GetDescendants()) do
	if Item:IsA("BasePart") then
		Item:SetNetworkOwner(nil)
	end
end

After doing this, all users who saw me as bouncy said that the issue had stopped while my physics ownership was on the server.

After this, I changed ownership of the physics back to me (game.Players.Xan_TheDragon) and the users said that the issue was no longer present. Oddly, while users saw me being jittery, all parts in my avatar and its descendants were being controlled by me in the aspect of network ownership.

Could this replication issue be related to the information in CSG/MeshPart and potential delays with sending said information?

Followup: That physics ownership quick-fix is functional 100% of the time.

I run this script on myself and other users who have the issue. I am consistently seeing this issue occur with people who use MeshPart / CSG in their models. With this information I should be able to have a repro soon.

Edit: Forgot to include the script.

Click to view
local Subject = workspace.SOME_PLAYER_HERE

for Index, Item in ipairs(Subject:GetDescendants()) do
	if Item:IsA("BasePart") then
		Item:SetNetworkOwner(nil)
	end
end
wait(1)
for Index, Item in ipairs(Subject:GetDescendants()) do
	if Item:IsA("BasePart") then
		Item:SetNetworkOwner(game.Players:GetPlayerFromCharacter(Subject))
	end
end