Hey! I asked a question about this teleport GUI, and someone gave me this script. And here is the GUI I made. https://www.roblox.com/library/5157648137/Teleport
local MessagingService = game:GetService("MessagingService")
local TeleportService = game:GetService("TeleportService")
local Players = game:GetService("Players")
function GetServerData(UserId)
local PlaceId
local JobId
PlayerFoundConnection = MessagingService:SubscribeAsync("PlayerFound"):Connect(function(GivenUserId, GivenPlaceId, GivenJobId)
if GivenUserId == UserId then
PlaceId = GivenPlaceId
JobId = GivenJobId
PlayerFoundConnection:Disconnect()
end
end)
MessagingService:PublishAsync("GetPlayer", UserId)
repeat wait() until not PlayerFoundConnection.Connected
return PlaceId, JobId
end
function TeleportPlayer(Player, PlaceId, JobId)
TeleportService:TeleportToPlaceInstance(PlaceId, JobId, Player)
end
MessagingService:SubscribeAsync("GetPlayer"):Connect(function(UserId)
for _, Player in pairs(Players:GetPlayers()) do
if Player.UserId == UserId then
MessagingService:PublishAsync("PlayerFound", UserId, game.PlaceId, game.JobId)
end
end
end)
Could someone help me?

4 comments
I don't know that much but should FindFirstChild and Player.Parent=(something idk) be included?
What do you need help with? I'm confused.
You are not supposed to ask questions regarding free models.
It's a free model I made though.