Random people are teleporting to my game, how can I stop it?

I just released my new game and this “friend” of mine joined and played the game for a bit, then started abusing poorly programed remotes I had used. He wasn’t doing it to ruin the game, as there was nobody else. It was annoying but honestly helpful because it helped me realized what I needed to fix. This was on my end because I had only checked certain critical things on the client, and not the server. Anyway, (at least I hope) I’ve fixed these remotes with vigorous server side checks to make sure that what’s happening is actually supposed to happen.

Anyway, after that he said something like “You want to see a magic trick?” and I didn’t exactly say no. Then, after a minute, two more random people joined the game at the same time. I was at first not sure if they were real people, but they showed up on the player list and escape menu. This was super confusing but then it got even weirder. He told me to check the server list, so I did and noticed that like 5 other servers will filled up with random people! (The server size was only 5 so it wasn’t as bad as it seems). In a panic, I shut down all the servers and made the game private.

After that, I asked the guy what that was about and he said that he had teleported people over from other games that had unverified emails. I have no clue how he did this. My theory is that there was a game or games that were backdoored, allowing him to teleport people from it into whatever game he wanted.

I don’t want this. I don’t want to be involved with anything about this but there’s nothing I can do. After a short while I made the game public again and it immediately started to fill up with people again. It wasn’t as crazy as last time, with only around two servers. I made the game private again and waited around an hour to make it public. When I did, it still had people teleporting.

I wish I had some way to stop this, but how? Also, does anyone know how this method of teleporting works?

To my knowledge it is not possible to fully disable incoming teleports from other places.

If you really don’t want people coming in from third party teleports, you can make a LocalScript in StarterPlayerScripts that listens to LocalPlayerArrivedFromTeleport and just kicks every player that joins via a teleport. If your place uses teleports (or you plan to do so in the future), you will need to pass in custom teleport data that discerns wanted from unwanted teleports.