Characters appear to fall apart locally

In my game, players have the ability to morph into different characters. This mostly works fine, however sometimes, completely randomly, a player’s character will appear to have fallen apart on the screen of another person, even though the character appears and moves perfectly fine for the other player. This bug is a real problem, as it means the player who sees the ‘broken character’ can’t then interact with that player unless they rejoin the game:

I tried to fix this problem by ‘disabling death’, like so, but it does not appear to have worked:

local player = game.Players.LocalPlayer

local function disable_death(plr)
	if plr ~= player then
		local char = plr.Character
		if not char or not char.Parent then
		    char = plr.CharacterAdded:wait()
		end
		local humanoid = char:WaitForChild("Humanoid")
		humanoid:SetStateEnabled("Ragdoll",false)
		humanoid:SetStateEnabled("Dead",false)
	end
end
for i,plr in pairs(game.Players:GetChildren()) do
	disable_death(plr)
end
workspace.ChildAdded:Connect(function(char)
	local plr = game:GetService("Players"):FindFirstChild(char.Name)
	if plr then
		disable_death(plr)
	end
end)

Any suggestions to fixing this ‘broken character’ bug?

1 Like

This is a bug which to my knowledge has not been fixed yet as I had to resort to creating a respawn script as of now when this happens.

2 Likes

I’m not sure what the status is of that API, but I had heard we were working on it at some point.
I’ll ask and see what’s going on with it.

4 Likes

Thanks!

1 Like

FWIW, the code you posted seems to be working fine (even though they’ve fallen apart locally, they haven’t died – there is no empty, red healthbar). It’s more likely this is triggered by the morph code.

2 Likes

Thank you

I use a morph system based off CloneTroopers’s one - I’ll scan over the code, but I don’t have a fully solid know-how of Humanoids.

Been having issues with this in Welcome to Bloxburg for a few weeks.

The game uses custom code for modifying character appearances, based on CloneTrooper’s method.

It happens rarely and only affects one client. Everything looks completely normal for everyone else.

Perhaps it could have something to do with the welds not replicating to that particular client?

2 Likes

That might be a possibility - I’ll try playing around with the welds in my spare time and see if it is a possible cause.

1 Like

You can detect if a Player Dies and then do

Humanoid:BuildRigsFromAttachment()

Tell me if it works or not.

2 Likes

I’ve tried this on the client and server, before and after death, but it produces the error ‘BuildRigsFromAttachment is not a valid member of Humanoid’ each time.

local humanoid = player.Character:WaitForChild("Humanoid")
humanoid:BuildRigsFromAttachment()

and

local humanoid = player.Character:WaitForChild("Humanoid")
humanoid.Died:Connect(function()
	humanoid:BuildRigsFromAttachment()
end)

Have you had any success with this problem? It appears to happen more with a poor connection and when players join the game, but I can’t say for certain as it’s a hard to replicate.

Do we have any updates on that API? I still have players reporting this problem on a daily basic

Nope, still happens occasionally.

2 Likes

Still waiting for the New R15 Api for the Humanoid to be enabled.

It should fix the problem but… it could introduce new problems as we know stuff like this can happen on Roblox.

2 Likes

You have the plural on the wrong thing, it’s BuildRigFromAttachments, rather than BuildRigsFromAttachment.

2 Likes

Good call, thanks!

I’ll see if I can get anything to work with this then.

So I think I’ve finally found a solution, however it’s very hacky and not ideal:

local function disable_death(plr)
	if plr ~= player then
		local char = plr.Character
		if not char or not char.Parent then
		    char = plr.CharacterAdded:wait()
		end
		local humanoid = char:WaitForChild("Humanoid")
		humanoid:BuildRigFromAttachments()
		humanoid.Died:Connect(function()
			for i = 1,10 do
				humanoid:SetStateEnabled("Dead",false)
				humanoid.Health = humanoid.MaxHealth
				humanoid:BuildRigFromAttachments()
				humanoid:ChangeState(Enum.HumanoidStateType.RunningNoPhysics)
				wait(0.1)
			end
		end)
	end
end
for i,plr in pairs(game.Players:GetChildren()) do
	disable_death(plr)
end
workspace.ChildAdded:Connect(function(char)
	local plr = game.Players:FindFirstChild(char.Name)
	if plr then
		disable_death(plr)
	end
end)
1 Like

I’ve got this bug too, and it DEFINITELY wasn’t happening a few months ago. Have you submitted this in bug reports?

2 Likes

I haven’t, no, as I’ve stopped experiencing it. How often are you finding it happening and when did it start?

1 Like