Further Respawn Improvements

Hello Developers,

We have released two further improvements to spawning to make sure characters are placed consistently and performantly.

  • Avatars will spawn more reliably in locations with lower ceilings, instead of popping above the ceiling
  • If an avatar has a tall hat, it won’t cause the avatar to spawn above a low ceiling
  • Optimized the vertical collision check during a spawn so it is more performant

Previously there were two main issues with how we checked if a character could fit in the space above the spawn location. The first issue was that the height of the character included the height of it’s accessories so characters with especially large hats were sometimes spawned outside areas that developers thought that they should be able to fit in. The other issue was that an additional 1.2 studs of space was sometimes needed due to the character incorrectly being seen as colliding with the ground even though there was nothing blocking the spawn location.

Before:

After:

We also fixed a performance issue with spawning that meant that the size of the world was being calculated unnecessarily each time a character was spawned. This meant that spawning was slower than it needed to be in large worlds.

If you had problems with avatars spawning in tight spaces, please try again and let us know if you have any further issues.

183 Likes

No instant replies under my watch! Let’s read the announcement before we start cheering - even though it is pretty awesome!

54 Likes

This topic was automatically opened after 14 minutes.

cheers :tada:
This is a pretty awesome update!

Jokes aside- thanks so much for this update. We can only be eternally greatful, please give the developers behind this a massive thank you on behalf of everyone in the developer community.

I have a question though:
Do we know when Avatar Loading Event Ordering Improvements will be released?

This Player:LoadCharacter(targetCFrame, withholdCharacter) is still an issue due to the change above not being due soon by the looks.

And finally, will we ever get support to change the RespawnTime on a per-player basis? Here is an example use case of this from @TheAmazeman.

22 Likes

Finally, this issue has plagued Roblox developers for years, especially those who build roleplay games. No more stress over designing prisoner cell ceilings in order to accommodate spawn locations, thank-you. :+1:

8 Likes

This, was surely a annoying thing to me and probably many other users,
since spawning on roof would require you to move your character
to the selected area instead of actually being put in there as normally.

Having this fixed or, well, “improved” is awesome as how we get this annoying thing away

3 Likes

This post was flagged by the community and is temporarily hidden.

1 Like

This post was flagged by the community and is temporarily hidden.

2 Likes

Thank you for mentioning my use case, I haven’t tested if my theory is possible yet.

5 Likes

Which is why I suggested this be added as in-built functionality- it’d be so much easier and there are many different examples to have per-player RespawnTime.

1 Like

Any use-cases for Player:LoadCharacter(targetCFrame, withholdCharacter) should be solved by Avatar Loading Event Ordering Improvements.

You can easily script a respawn system that allows for a custom respawn time per-player.

Here’s a quick rough example (this assumes Players.CharacterAutoLoads is false):

local Players = game:GetService("Players")

local RespawnTimes = {}
local Rand = Random.new(tick())

Players.PlayerAdded:connect(function(Player)
	RespawnTimes[Player] = Rand:NextInteger(0,10)
	
	Player.CharacterAdded:connect(function(Character)
		local Humanoid = Character.Humanoid or Character:WaitForChild("Humanoid")
		
		Humanoid.Died:connect(function()
			wait(RespawnTimes[Player])
			pcall(function() --Players can leave before this executes
				Player:LoadCharacter()
			end)
		end)
	end)
	
	Player:LoadCharacter()
end)

You can easily edit the values inside of the RespawnTimes table to change the respawn time for a given player.

6 Likes

If there was anything more annoying than the spawn behaviour prior to this update, it was having to account for low ceilings by either forcing characters down via CFrame or completely butchering the build to accommodate for players, whether that’d be expanding the place or adding a no-collide roof for spawning.

One thing that this thread hasn’t addressed though is custom characters, at least from what I can see. How does respawning for different character rigs play out, the same or differently? Is that something to test ourselves depending on our rigs?

1 Like

I’m guessing that these fixes don’t address my particular issue, because it’s still happening. If a part with collision disabled is obstructing a SpawnLocation, players will spawn on top of it anyway as if collision were enabled, which results in 2 scenarios, both of which are 100% reproducible:

  1. There is no collidable part above the non-collidable part, in which case the player will just fall to the ground.
  2. There is a collidable part (a roof or ceiling, for example) above the non-collidable part, in which case the player will be spawned on top of the collidable part and become stuck.

4 Likes

Thanks for your report, we will take a look into this bug.

3 Likes

I’ve always had problems with Spawns spawning players above a ceiling. I’ve always been combating this issue for a few months now. I really enjoy seeing it fixed now.

This is such a wonderful update. Now I don’t have to compensate for prisoner cell ceilings and spawn location.

thank you, this was a huge issue in obby games as well as games that had a lobby

1 Like

This was actually one of the major spawn issues I capitalized on a while back with this post: Spawnlocation Spawns Players Above Certain Parts

I’m glad to see you guys read the feedback and actually went to fix it! This makes mine and tons of other developers’ lives so much easier!

Let me just say this much-

Thank you, thank you, THANK YOU SO MUCH!!!

This was an issue that has always bothered me! This was a definite problem that I always seemed to encounter when working on games of mine such as obbies or showcases. I’m so thankful that the Roblox team is starting to finally resolve this annoying bug after so many years…