Why is it when I do :LoadCharacter() sometimes the characters are naked?

Like the title says, it happens on the clients though.

This pic wasn’t taken by me, someone else took it when the glitch happened to them, but on my screen it works fine?

I did this

local function ClearArena()
	workspace.Arena.Map:ClearAllChildren()
	workspace.Arena.Characters:ClearAllChildren()

	for _, player in ipairs(Players:GetPlayers()) do
		-- Reset team
		player.Team = game.Teams:FindFirstChild("Lobby")

		player.Backpack:ClearAllChildren()
		for i, v in pairs(player.Character:GetChildren()) do
			if v:IsA("Tool") then
				v:Destroy()
			end
		end

		if player.Character then
			player:LoadCharacter()
			task.wait(0.1)
		end
	end
1 Like

why do you check if the character exists before loading it

Are there any errors in the output from Roblox scripts that could relate to this issue?

If you store players’ characters in workspace.Arena.Characters, then why do you destroy their character when you respawn them anyway? This could be the issue. Try removing the line and see how it behaves.

Also some other things I find redundant in this code:

  1. Looping through the character and destroying tools, but you respawn them anyway.
  2. Doing FIndFirstChild() on a team. If it’s premade in Studio and not tampered with scripts on runtime, then it’ll 100% be there, so you can use the . method.
  3. Checking if player exists before loading. If you destroy the character then check it before respawning, how/are they even respawning in the first place?
  4. task.wait(0.1)
  5. LoadCharacter() already clears the backpack (See docs)

Overall, it could just be these minor things causing the issue. This is my revision of your code:

local function ClearArena()
	workspace.Arena.Map:ClearAllChildren()
	for _, player in Players:GetPlayers() do
		player.Team = game.Teams.Lobby
		player:LoadCharacter()
	end
end
2 Likes

I do ragdolls
)))))))))))))))))

can’t you just clone the character of the player and do ragdolls on it?

I’ll try this, I’ll report back if it works after the next playtest session cause it happens rarely

Yeah, it was an oversight in the old ragdolls system, I just updated the ragdolls and forgot to check the clear arena code

Hi!

I suggest using this Player:LoadCharacterWithHumanoidDescription() as a control group to see what’s causing the issue. You can use Players:GetHumanoidDescriptionFromUserId(Player) to get the humanoid description.

well, I don’t see it happening anymore or any reports

I’ll mark this as answer