#How to disallow players to join mid game!
1 messages · Page 1 of 1 (latest)
do something like this ``` local TeleportService = game:GetService("TeleportService")
local GAME_PLACE_ID = 123456789--replace this with your gameid
TeleportService:TeleportAsync(
GAME_PLACE_ID,
{player},
{ match = true }
)and then detect any player who joins into your game checking if they are match or not, if not then send them back to the lobby gamelocal TeleportService = game:GetService("TeleportService")
local Players = game:GetService("Players")
local LOBBY_PLACE_ID = 987654321
Players.PlayerAdded:Connect(function(player)
local data = TeleportService:GetLocalPlayerTeleportData()
if not data or data.match ~= true then
TeleportService:Teleport(LOBBY_PLACE_ID, player)
end
end)
ty bro it worked !!!!!!😁
** You are now Level 2! **
Np
Don’t reserved servers already handle that