Teleporting is messed up for me

I am trying to make a teleport to friends gui but whatever game you teleport to, it errors and says this:

No matter who I join or what game there in, it won’t TP. So I put this message up on the GUI:

Please help me. I don’t know why this is happening.

(TP SCRIPT [LocalScript])

local friends = player:GetFriendsOnline(10)
local temp = game.ReplicatedStorage.Template
local tps = game:GetService("TeleportService")

for i,v in pairs(friends) do
	local newFrame = temp:Clone()
	newFrame.PlayerName.Text = v.UserName
	newFrame.Avatar.Image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=150&y=150&Format=Png&username="..v.UserName
	newFrame.Parent = script.Parent.Frame.ScrollingFrame
	if v.LastLocation then
		newFrame.GameName.Text = v.LastLocation
		newFrame.Join.MouseButton1Click:Connect(function()
		script.Parent.loadingScreen2.Visible = true
		script.Parent.loadingScreen2["1"].Text = "Driving To "..newFrame.GameName.Text
		script.Parent.loadingScreen2["2"].Text = " "
local succ,err = pcall(function() 
	tps:TeleportToPlaceInstance(v.PlaceId, v.GameId, player, script.Parent.loadingScreen2)
end)
			if err then
				script.Parent.loadingScreen2["1"].Text = "Could not teleport to the game: "..err
				wait(5)
				script.Parent.loadingScreen2.Visible = false
			end
		end)
	end
end

The games are not private too.

1 Like

As well as that, the GUI goes blank if I try to get the friends more than 1 or 2 times.

It returns an error too: GetFriendsOnline: Request Failed because HTTP 429

Oh wait, it is just because I am “overloading” it with requests I guess?

1 Like

Maybe the place that you are teleporting is only allowed for the people who joined their group or the people who paid for the access.

I will also happen if you tried to teleport the player to a place that isn’t set to main.
For example, MeepCity’s minigame teleports you to another place. Except it is one of the place in you game.

1 Like

I tried it on an alt (the alt was in my game as well as me in the game) and it said the same thing.

1 Like