Places inside Universe not displaying properly?

So this is my Universe with places inside it

This is the main game

However if we go into a place in the universe for example Public Pitch you can see the name of the Place is the Universe Name and not the Place name.

The player count is also the same as the Universe player count and I need the individual place count to display how many players are in what place.

Also when friends are playing it displays they are playing the Universe name and not the actual place they are playing, so friends have issues following each other

I need to be able to get the place player count to script, and the place name if anybody knows what’s wrong I would highly appreciate it, please ask me anything.

Hello there, sadly, you cannot see each place’s player count using ROBLOX stats. You can instead, enable HTTP requests and when a player joins, it would track it. Google analytics would be a good solution for an easy use. Using Google Analytics would be a really good guide and you can save events and such that would be perfect!

3 Likes

Hi, yea I saw using HTTP requests was good, except Roblox isn’t giving me my player count for my place, and only my Universe so I can’t scrape that value. Is that normal behavior ?

Also it doesn’t display the name of the place, it should be Public Pitch but it displays the universe name “English Conference Leagues” instead, do you know anything about that ?

About the name I don’t know why this is happening for you. Last year, I was testing TeleportService and added 2 places in 1 game(universe)and it worked well. The name might be shown incorrectly in the website but it could be right when you are using teleportservice. A player cannot join the place directly. He must join the start place first and then he could go to the other place using teleport service. As for the player count, ROBLOX developer stats counts players in the whole universe.

2 Likes

I believe this behaviour was changed around the time when behaviour for Start Places did. I do remember that in the past, you were able to view place information appropriately. That’s not the case anymore, all subplaces display information of the Start Place.

You may want to write a Feature Request to have this reverted, provided you have a good reason for needing to see subplace information.

1 Like

You can count each player that joins and use datastores which would allow u to transfer data within the universe, maybe even ordereddatastores…

That’s a terrible idea and hardly what OP is asking. Counting players is a waste of DataStore requests, you’re better off sending data around via MessagingService. As well, they’re mainly concerned about the fact that each subplace displays the information of the Start Place, rather than the actual subplace itself.

1 Like

Yea, the name shows correctly when you teleport to the place, I remember players inside Universes having the place name they were playing and not the Universe name they were playing when you checked what game they were playing on their friend’s list.

Thank you for that information, I thought that people could join places without going through the start place. I’ll just have to work with it I guess.

Thank you, I was wondering because I knew that Universes had different behavior before. I’ll just have to work with it, it’s not too much of an issue. MessagingService sounds really interesting, I’ll have to read up on it, thanks again.

I made this script using MessagingService, thanks @colbert2677 for the idea, it works well in accordance to a GUI I have, feel free to use it, modify or give me tips on how to improve it, thanks for all the replies everyone I appreciate it.

Start Place script:

local pages            = game:GetService("AssetService"):GetGamePlacesAsync()
local messagingService = game:GetService("MessagingService")

local placePlayerCounts = game.Workspace.PlacePlayerCounts

while true do
	for _,place in pairs(pages:GetCurrentPage()) do
		local placeValue = Instance.new("StringValue", placePlayerCounts)
		placeValue.Name  = place.Name
		placeValue.Value = 0
	end
	if pages.IsFinished then
		messagingService:PublishAsync("initialPlayerCount")
		break
	end
	pages:AdvanceToNextPageAsync()
end

function updatePlayerCountFunction(tbl)
	local message = tbl.Data:split(":")
	placePlayerCounts[message[1]].Value = message[2]
end

messagingService:SubscribeAsync("updatePlayerCount", updatePlayerCountFunction)

Places in Universe Script:

local Players            = game:GetService("Players")
local messagingService   = game:GetService("MessagingService")
local marketplaceService = game:GetService("MarketplaceService")

local placeName   = marketplaceService:GetProductInfo(game.PlaceId).Name
local playerCount = 0

local function publishPlayerCount()
	local messageData = placeName .. ":" .. tostring(playerCount)
 	messagingService:PublishAsync("updatePlayerCount", messageData)
end

Players.PlayerAdded:Connect(function(player)
	playerCount = playerCount + 1
	publishPlayerCount()
end)

Players.PlayerRemoving:Connect(function(player)
	playerCount = playerCount - 1
	publishPlayerCount()
end)

function initialPlayerCountFunction()
	publishPlayerCount()
end

messagingService:SubscribeAsync("initialPlayerCount", initialPlayerCountFunction)