TeleportService Script not functioning in one game, but does in others

I am attempting to teleport players to a Lobby upon dying, so I simply copied and pasted this script from one of my other games but it is not working. Output does not say anything is going wrong. I’m confused as to why this is because the script works in literally every other game but this one. To add onto that, the place ID is the exact same in all games.

local LobbyId = 9717836055

local function onCharacterRemoving(char)
	local player = game.Players:GetPlayerFromCharacter(char)
	game:GetService("TeleportService"):Teleport(LobbyId, player)
end

local function onPlayerAdded(player)
	player.CharacterRemoving:Connect(onCharacterRemoving)
end

game.Players.PlayerAdded:Connect(onPlayerAdded)

Is this place in your universe? A universe in Roblox basically means there’s a “main” experience, and then there are sub-places you can teleport to in that place or access the same data from DataStores across these sub-places.

If not, I’d check your game settings and make sure you have enabled the option to teleport to allow third party teleports in the Security tab.

Yes, it is within a universe. As explained, I’ve used this script for every other place within this universe, but it is not working for my most recent place.

I see, you’ve checked to make sure your code is actually running and reaching that point?

It might be good to note that sometimes the server loads your script after your player loads in, meaning PlayerAdded never fires for that first player (in some cases, but it does happen). Make sure you setup a loop before your PlayerAdded call to process any players who have already been loaded in before the server registered your script.