Further Respawn Improvements

Any use-cases for LoadCharacter at a specific position - #8 by Noble_Draconian 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.

7 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?

3 Likes

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.

https://i.gyazo.com/cc2060b65a50bfa660c0d0b985947ed9.gif

5 Likes

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

5 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.

2 Likes

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!

1 Like

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…

1 Like

An additional note on spawns. We increased the size of the default spawn pad in Studio and all of the official Roblox spawn pads in the toolbox. We recommend you use a larger spawn pad if you don’t want avatars stacking on top of each other.

5 Likes

I’m glad that you’re fxing this issue! Now spawning for games like showcases will be much neater!

1 Like

Boy, that was quick! Glad to see this is fixed in the latest release (406). I gather this will be turned on at some point in the next few weeks?

image

1 Like

Yes, all going well this should be turned on in the next week or so.

2 Likes

This has been really needed, thank you so much for it.

1 Like

We have released the fix to this issue.

1 Like

Time to say goodbye to the good ol betsy of a fake roof inside a box so players wouldn’t escape for tight hallways, and well, this was one of the main actors in why there is barely any hallway games

time to make a huge hallway

Thanks Roblox! :tada:

2 Likes

Can confirm the issue is no longer happening in any case where it was previously. :+1:

While this is not about spawning over the ceiling, I’ve have encountered a related problem where you can’t spawn below -400 y. If it happens that you have a spawnLocation below that, it will just spawn you at -400 y which you would then fall until you reach the ground.

Aren’t parts automatically destroyed after Y-500?

Yea, this is the default value but you can change it.

Have you done so?

Yes, that was already done. The problem isn’t there.