Place Teleport Using UUID

Hello! I’m making direct connect to my game however i get error that place is restricted despite fact should’t be:
image

[Alpha] is game menu > Legacy is game im trying to join

I’m trying to connect using job id (teleport for admin)

Code
local text = script.Parent.TextBox.Text

-- 5167224097

function hit()

text = script.Parent.TextBox.Text

game:GetService("TeleportService"):TeleportToPlaceInstance(5167224097, text, player)

end

script.Parent.TextButton.MouseButton1Click:Connect(hit)

Text = UUID text in text box

image

1 Like

Is the place your teleporting to private?

2 Likes

I was also thinking that but he has edit permissions or is the owner of the place so that can’t be the problem. Unless he is using a test account.

2 Likes

It could possibly be a roblox issue, how many times has this happened?

2 Likes

No, its public text its teleport for admins (if there is exploiter on server players will give code to admins soo they can join)

2 Likes

Everytime trying to connect (30 Chars)

1 Like

Yes, i have edit permissions but acording to documentation it should join even players what dont have perms to join (Legacy)

1 Like

Have you tired using

game:GetService("TeleportService"):Teleport(00000000, player)

3 Likes

There is problem i need to have JobID there

1 Like

I’m assuming your “text” is 5167224097, which is not the JobId. You can get the jobId by using game.JobId

JobId looks something like 35f6e6a0-930e-4ab7-94c9-15a7844b03aa.

JobId is used when you want to enter a specific server, if you just want to teleport the player to the place, then using :Teleport(id) will do.

2 Likes
local TeleportService = game:GetService("TeleportService")
local Players = game:GetService("Players")
 
Players.PlayerAdded:Connect(function(player)
	-- Is this player following anyone?
	local followId = player.FollowUserId
	-- If so, find out where they are
	if followId and followId ~= 0 then
		local success, errorMessage, placeId, jobId = pcall(function()
			return TeleportService:GetPlayerPlaceInstanceAsync(followId)
		end)
		if success then
			-- Teleport player
			TeleportService:TeleportToPlaceInstance(placeId, jobId, player)
		end
	else
		warn("Player " .. player.UserId .. " is not following another player!")
	end
end)

This is what the DevHub says to do. Be sure you’re writing the correct code.

1 Like

I would first like to emphasize @astra_wr 's response seeming as he is right that the JobId should look like that.

However two requirements to make sure of:

  • the server which has the JobId is actively running, if the server closes the place automatically becomes restricted. To test this you would need a friend in the server which needs help.
  • you cannot teleport to a sub place of a universe unless you are in the universe already - in other words it will not work if the place your teleporting from is not a sub place of the universe.
2 Likes

I do not believe this is a solution to his problem.

If you read the specifics he wants to be able to teleport through using a JobId seeming as you can’t follow any and all players.

1 Like

I was just implying that his “JobId” could be incorrect.

1 Like

Text is jobid

“Text = UUID text in text box”

1 Like

That isn’t a job ID that is a comment. What is the job ID that is in the text box? The actual job ID?

1 Like

@6Clu

  1. Server is running im testing this feature live with people on servers
  2. Its same universe
2 Likes

Yes, its local set from textbox once you press button

1 Like

But what is it? What is the JobID value that is set?

1 Like

This is code to follow someone (player connects to diff server = code teleports you with him) i dont need this

1 Like