local Frame = script.Parent
local Gui = Frame.Parent
local FriendText = Frame.Friend
local Join = Frame.Join
local TeleportService = game:GetService("TeleportService")
local player = Gui.Parent.Parent
local Player = player

Join.MouseButton1Click:connect(function()
	local Name = FriendText.Text
	local ran, PLR_ID = pcall(function()
		return game:GetService("Players"):GetUserIdFromNameAsync(Name)
	end)
	print(PLR_ID)
	if ran then
		print(PLR_ID)
		if player:IsFriendsWith(PLR_ID) then
			print(player.Name.." is friends with "..Name.."! Initiating Teleport...")
			warn("Teleporting...")
			local function followPlayer(player, targetplayer)
			    local success, errorMsg, placeId, instanceId = TeleportService:GetPlayerPlaceInstanceAsync(targetplayer)--
			    if success then
			        TeleportService:TeleportToPlaceInstance(placeId, instanceId, player)
			    else
			        print("Teleport error:", errorMsg)
			    end
			end
			followPlayer(Player, PLR_ID)--
		end
	end
end)

ignore the variables lmao, this throws the error: HTTP 0 (HTTP 400 (HTTP/1.1 400 UserOffline)) however, the player is in fact playing the game. This is between two seperate games, but in the shared universe.