I’m trying to make it that when a player touches a part they teleport to a different game altogether but whenever I try doing this it always says teleport failed. Here is my code:
local TeleportService = game:GetService("TeleportService")
local gameID = 9424926656
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
As a quick note, you should probably use Roblox’s SafeTeleport module. It makes teleports retry if they are failed, for a certain amount of times. (in addition to some other things, this is the main one I noticed)
You might want to apply some additional code so your code doesn’t try to teleport the player, even if it keeps failing, as this could be a bug with Roblox’s servers or the client’s internet. We don’t want to keep retrying if the teleport fails over and over without success.