Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Attempted to teleport to a place that is restricted?

So i made a friends list game which doesn't work... Place : https://web.roblox.com/games/5572121130/Join-friends-simulator output : output : RaiseTeleportInitFailedEvent: Teleport failed because This game is restricted (Unauthorized) Script :

game.Lighting.RemoteEvent.OnClientEvent:Connect(function()
	local Player = game.Players.LocalPlayer
	local TPS = game:GetService("TeleportService")
	
	for i, v in pairs(Player:GetFriendsOnline(40)) do 
		      local PlayerGui = Player:WaitForChild("PlayerGui"):WaitForChild("ScreenGui2")
		local newFrame = game.ReplicatedStorage.Frame:Clone()
			newFrame.TextLabel.ImageLabel.Image = "https://www.roblox.com/Thumbs/Avatar.ashx?x=150&y=150&Format=Png&username="..v.UserName
		    newFrame.TextLabel.Text = v.UserName
		if newFrame.TextLabel.TextLabel.Text == "Website" then
			newFrame.TextLabel.TextButton:Destroy()
			newFrame.TextLabel.TextLabel.TextColor3 = Color3.new(1, 251, 255)
		end
		if newFrame.TextLabel.TextLabel.Text == not "Website" then
			newFrame.TextLabel.TextLael.TextColor3 = Color3.new(59, 255, 5)
		end
		    newFrame.Parent = Player:WaitForChild("PlayerGui"):WaitForChild("ScreenGui2").Frame.ScrollingFrame
		    if v.LastLocation then
			newFrame.TextLabel.TextLabel.Text = v.LastLocation
			newFrame.TextLabel.TextButton.MouseEnter:Connect(function()
			newFrame.TextLabel.TextButton.Text = v.GameId
		end)
		newFrame.TextLabel.TextButton.MouseLeave:Connect(function()
				newFrame.TextLabel.TextButton.Visible = false
				newFrame.TextLabel.TextButton.Visible = false	
				newFrame.TextLabel.TextButton.Text = ""
			end)
			newFrame.TextLabel.TextButton2.Text = "Join "..v.UserName
			newFrame.TextLabel.TextButton2.MouseButton1Click:Connect(function()
				TPS:TeleportToPlaceInstance(v.PlaceId, v.GameId, Player)
			end)
		end
		end
end)

4 comments

0

Is the friends games privates?

0

Probably the prob

0

Nope

0

ill send the output : RaiseTeleportInitFailedEvent: Teleport failed because This game is restricted (Unauthorized)

2 answers

My guess is you have to enable teleports in game settings. Also how dare you have basicly the same user as me.

1 comment

0

Entity_246 i am a fan of Entity303 ok?

did you add the universe id or the place id?

6 comments

0

i made this post long ago

0

ill try to see

0

TPS:TeleportToPlaceInstance(v.PlaceId, v.GameId, Player)

0

TPS:TeleportToPlaceInstance(v.PlaceId, v.GameId, Player)

0

TPS:TeleportToPlaceInstance(v.PlaceId, v.GameId, Player)

0

TPS:TeleportToPlaceInstance(v.PlaceId, v.GameId, Player)

This discussion is preserved as it was. New answers, comments, and votes are closed.