Value is nil when player leaves for some reason

Yes. As we saw earlier, your “roomName” variable stored an empty string. This means player.RoomName.Value does not contain a relevant value