Spawning an R15 player can be incredibly inconsistent in enclosed spaces

Reproduction Steps

This bug specifically occurs in R15 games. Avatar scaling options don’t matter, but I’ve experienced this with using classic R6 scaling on the R15 avatar if it matters.

  1. Create an enclosed room with a total headspace of 26 studs (I’m sure this number can vary, but this is a specific measurement where this bug has occurred for me)
  2. Create a SpawnLocation with a height of 1 stud (the SpawnLocation dimensions don’t appear to matter)
  3. Spawn your player character
  4. Observe that sometimes your player character will spawn on the roof
    image

SpawnLocations normally put player characters in the first area where it thinks there is enough room for them. I assume something with the R15 rig makes the SpawnLocation occasionally think that the player character would not fit in this somewhat large space.

Expected Behavior

Because the player character has enough space to spawn (greater than ~6 studs), I expect players to spawn on the SpawnLocation inside the room every time.

Actual Behavior

The player character occasionally spawns on top of the ceiling of the room. This appears to be more inconsistent if the player is wearing avatar bundle pieces.

Workaround

Use R6. This bug only occurs with R15 avatars.

Issue Area: Engine
Issue Type: Other
Impact: High
Frequency: Often
Date First Experienced: 2019-07-03 00:07:00 (-04:00)
Date Last Experienced: 2021-10-09 00:10:00 (-04:00)

10 Likes

Thanks for the report! We’ve filed a ticket to our internal database and we’ll follow up when we have an update for you.

6 Likes

Occasionally my character would fall in the void. Don’t know if it is caused by this or the game has just not been loaded yet.

1 Like

Also, if you have a place file you can give us to repro the issue, that would be very helpful

3 Likes

I have DMed you a repro file of the place in my original video. I have a few other places where this occurs if you would like some additional repros.

2 Likes

@cloakedyoshi i’ve looked into the repro place you sent me. The only way I can get a player to spawn on the roof is when no spawn location could be found (in this situation the player spawns up in the air, but at 0,0 on the ground plane). I could make this happen by deleting all the spawn locations or making it so the player is not on any of the teams of the spawn locations. Is there any way your code could have a bug where a player occasionally is not on any of the teams of the spawn locations at the time of spawn/respawn? Alternately is there anything else you can think of that makes the issue more likely to occur. Does the position the player is at at the time the reset is requested have any effect do you think?

2 Likes

I would lean towards no. The teams and spawns always exist - I never destroy, create, modify, or reparent them. For context, I set the player’s team when they touch an invisible part. I set the player’s TeamColor to the BrickColor of the invisible part.

The only thing I could hypothetically see is if there was somehow a floating point error when setting a team color - as BrickColors appear to have small ranges of Color3 values.

However, the screenshots affirm that setting the team is likely not the issue. As you can see in the second screenshot in the chat window, it never says the player has joined a different/neutral team.

I can’t see the code for Roblox’s SpawnLocation logic, so I honestly have no idea. I’ve included some potentially related possibilities below.

I have three possibilities I’ve contemplated, all of which revolve around the idea of character scaling and hitboxes:

  1. Avatar bundle pieces can be scaled weirdly, even when you set game settings to not allow proportions.
    Perhaps this means some avatars would be more prone to weird spawning when using various body pieces or perhaps even accessories. Last I checked, various rthro head/leg hitboxes still have some of those funky sizes.

  2. If a player touches a laser in that room, the touching limbs are either destroyed or sent flying. Depending on when the character bounds are calculated, maybe it expects a much taller or shorter character because the player’s pieces are scattered or destroyed.

  3. Similarly to the above, when a player dies, I parent constraints into the character in order to ragdoll them. Depending on when the character bounds are calculated, maybe it retrieves an irregularly shaped character.

Out of all of these, I lean towards #1 the most. However, it still wouldn’t fully explain why a fully blocky R15 character could sometimes spawn on the roof.

1 Like

Looking at this again, from your screen grab it looks like in the bad spawning case, you spawn directly above the spawn point, but far too high, so you end up on the roof. Would that be correct? (you’re not at 0,0 on the ground as I first thought). This could happen if the character’s bounding box is far too big. I couldn’t repro this but there may be a scenario it could happen. Did you say you have seen this with a R15 character which has nothing equipped? What platforms have you seen it on? Can you repro in Studio? Windows/Mac client? iOS? In the place you gave me, some of the scripts don’t work. Is there anything you’re doing which changes the usual spawning process? Any settings/property changes? Which character specifically makes this more likely to happen? Could you give me a bundle id? Or could you give me a HumanoidDescription in a place file? Do you know the asset ids of accessories which make it more likely to happen? Also, is your game setting StreamingEnabled on in Workspace?

2 Likes

Correct.

I have not seen anything with a blank blocky R15 character. I’ve noticed funky stuff with blank rthro R15 characters however.

Roblox Player (PC, Windows 10) x4
Roblox Studio (PC, Windows 10) x2

Nope. No custom spawning logic. The only possible pertinent script that seems like it could affect this (imo) is a ragdoll module that ragdolls a player on death.

On respawn/death, no. I do use attributes on the player instance FWIW.

This bug has occurred for the following avatars:
image image image image
It looks like they all have a large waist accessory in common.
Avatar 1 has swords at their hip.
Avatars 2 and 4 have large demon tails. Avatar 3 has a large pumpkin.
However, Avatar 4 also has differently sized rthro limbs, drastically changing the waist hitbox. I believe they use Magma Fiend for the torso and legs.

I can reach out to the users of avatars 1 + 2 if needed, but I don’t recall who avatar #4 belongs to. Avatar 3 is me.

Nope.

Got some additional reports from players dressed like this:
image image

Seems like it could be that large accessory theory.

@CalGamesDev
Even better, this attached HumanoidDescription has a 100% repro of spawning on the roof in the place file I had linked to you a bit ago.

image
100Repro.rbxm (2.6 KB)

If you apply this description to your character, make it to the second spawn, and die - you will always spawn on the roof.

I believe I have figured it out. There’s an invisible trigger behind the spawn that is used to change a player’s team. If the player’s accessories clip into that trigger, it perceives it as the character’s hitbox, and compensates by moving them up (above the trigger, hence why it spawns on the roof).

I can solve this by deleting the trigger, turning CanTouch on the trigger off (which breaks it from changing teams), moving the trigger further back, or moving the spawn further forward to compensate for large accessories. However, this still feels like a bug. It doesn’t make sense for accessories to be calculated in a player’s spawn detection IMO.