How can I detect if the game server is a team create server?

Greetings,

I would like to detect when the server is a team test server, so specific scripts get disabled and some others enabled. Is there a way that I can do this? I tried using RunService:IsStudio() but it didn’t work.

4 Likes
local RunService = game:GetService("RunService")
local IsStudio = RunService:IsStudio()
wait(3)

if IsStudio and #game.Players:GetChildren > 1 then
       print("Team Test")
else
       print("Solo Test")
end

3 Likes

As I said, RunService:IsStudio() doesn’t detects if it’s a team create server or not. I want to detect if the current server is a team test server or if it’s a regular game server.

2 Likes

I’m pretty sure you can’t detect if team create is on or not.

There’s no reliable way to detect that. You could modify his code by adding something like “and not string.find(game.Players:GetPlayers()[1], “Player””, but there isn’t really much else. A potentially more reliable one would be to check if the UserId is greater than zero, because the solo test with multiple players makes the UserIds of those players -1, -2, -3…