RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"create a text button that shows how many players are playing in a game"
-- LocalScript in TextButton local textButton = script.Parent local Players = game:GetService("Players") local function updatePlayerCount() local playerCount = #Players:GetPlayers() textButton.Text = "Players: " .. playerCount end Players.PlayerAdded:Connect(updatePlayerCount) Players.PlayerRemoving:Connect(updatePlayerCount) updatePlayerCount()