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.