Character spawning halfway inside ground

Reproduction Steps

Reproducing this bug is extremely inconsistent - it happens randomly when player’s character spawns in. I myself have not experienced the bug, however it has been reported many times by our players and it appears to happen quite frequently.

I believe that the issue is caused by our package remover script:

local function packageRemover(char,plr)
	wait()
	local humanoid = char:WaitForChild("Humanoid") -- Package remover

	local descriptionClone = humanoid:GetAppliedDescription()
	descriptionClone.Head = 0
	descriptionClone.LeftArm = 0
	descriptionClone.RightArm = 0
	descriptionClone.LeftLeg = 0
	descriptionClone.RightLeg = 0
	descriptionClone.Torso = 0
	humanoid:ApplyDescription(descriptionClone)
end

The package remover function is connected to the CharacterAdded event. We tried using the CharacterAppearanceLoaded event too, however, the issue still kept occurring.

Expected Behavior

I expect the character to spawn in properly. I expect the player to be able to move around and jump, as expected.

Actual Behavior

The affected player is unable to move, jump… do anything. They are effectively stuck. It almost looks like their HumanoidRootPart was Anchored, but it is not.

The Humanoid instance shows to signs of being affected by this bug - everything seems normal. See the screenshots attached below:
image


image

I have tried everything to fix the Humanoid, but without success. I tried applying cloned humanoid description, I tried changing the humanoid’s state. Nothing works. Cloning the affected character did work for the clone, though - after cloning the affected character and parenting it to the Workspace, the new character was showing no signs of being glitched, whilst the player was still stuck without any change.

Our game affected by this bug: SCP: Site Roleplay - Roblox
The game has StreamingEnabled set to true and StreamingPauseMode is set to ClientPhysicsPause (the issue happens while this is set to Default too)

Videos describing the issue:


Roblox VR 2022.08.06 - 21.46.47.03.mp4 - Google Drive

Issue Area: Engine
Issue Type: Other
Impact: High
Frequency: Often

1 Like

I feel like you already tried this but, have you moved the spawn location up a bit?

1 Like

Spawn location position makes no difference.

1 Like

do you have a place which repros this issue? I realize you haven’t experienced the issue, but maybe if you give me a place that has everything set-up, maybe I can see if there might be any problems. Did having the packageRemover function called from characterAdded work to remove the body parts? (CharacterAppearanceLoaded seems the correct place to be calling ApplyDescription())

I don’t have any place that I can be sure reproduces the issue. After noticing the issue in our game, I have switched to CharacterAppearanceLoaded, but as I said - the issue still occurs. The package removing function has been working and successfully replaces any body packages with the default blocky body parts.

Here is a place that has the packageRemover function in it, and StreamingEnabled (set up like in our game):
CharacterInGroundRepro.rbxl (34.4 KB)
Please note that our game is R15 only.

Wish you luck!

I can’t repro. We have a fix coming for something similar to this, but I can’t guarantee it’s the same issue. I was wondering if it’s possible for you to manually spawn the character and do the packageRemover() code before the character is spawned to see if it would help. So something like the following:

game.Players.CharacterAutoLoads = false
 
local function onPlayerAdded(player)
	local function load()
		local humanoidDescriptionForUser = game.Players:GetHumanoidDescriptionFromUserId(player.UserId)
		humanoidDescriptionForUser.Head = 0
		humanoidDescriptionForUser.LeftArm = 0
		humanoidDescriptionForUser.RightArm = 0
		humanoidDescriptionForUser.LeftLeg = 0
		humanoidDescriptionForUser.RightLeg = 0
		humanoidDescriptionForUser.Torso = 0
		
		player:LoadCharacterWithHumanoidDescription(humanoidDescriptionForUser)
	end
	
	player.CharacterAppearanceLoaded:Connect(function(character)
		local humanoid = character:WaitForChild("Humanoid")
		if not humanoid then
			return
		end
		humanoid.Died:Connect(function()	
			wait(5)			
			load()
		end)
	end)
	
	load()
end

game.Players.PlayerAdded:Connect(onPlayerAdded)

(If you are using the above code and you don’t care about gear you could also set StarterPlayer.LoadCharacterAppearance to false)

If it’s possible for you to use the code above instead of what you have, I’d be interested to know if it fixes your issue

1 Like

Sure thing! Thank you for coming up with this possible solution - I will definitely try this one.

I will adjust our game’s scripts and implement your solution (without the StarterPlayer.LoadCharacterAppearance part) tomorrow.

I will let you know the results as soon as I get them.

1 Like

I have not experimented with adding a delay since it would look worse if there was a delay between spawning and removing packages. I am currently trying @CalGamesDev’s solution and it seems to be working fine so far.

Hey! It looks like your workaround has been working great so far. I have not received a single report of a player stuck in the ground ever-since I implemented your approach.

Only thing that I had to change was adding height, width, etc overwrites (because game settings don’t apply to GetHumanodDescriptionFromUserId).

1 Like

This started happening to me when I switched to opportunistic streaming, modifying any part of my characters causes them to topple over and never get up like demonstrated in the video.

1 Like

@anon47429092 are you able to share a simple repro place?