RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"create a text button that shows how many players are playing in a different game place."
-- Local script inside the TextButton local textButton = script.Parent local HttpService = game:GetService("HttpService") local Players = game:GetService("Players") local placeId = 123456789 -- Replace with the Place ID of the game you want to check local function updatePlayerCount() local url = "https://games.roblox.com/v1/games?universeIds=" .. placeId local response = HttpService:GetAsync(url) local data = HttpService:JSONDecode(response) local playerCount = data.data[1].playing textButton.Text = "Players in other game: " .. playerCount end textButton.MouseButton1Click:Connect(updatePlayerCount) updatePlayerCount() -- Initial update on player count