I am trying to teleport to another server of the same game via a in game portal. but cant seem to get the findign another server to teleport to to work for me. the relevant script i am using is below.
local serverListDS = game:GetService("DataStoreService"):GetDataStore("ServerList");
local jobId = game.JobId;
for i,v in pairs (serverListDS:UpdateAsync("OpenServers"):GetChildren()) do
if v.JobId ~= jobId then
local u1 = v.jobId
game:GetService("TeleportService"):TeleportToPlaceInstance(PlaceId, u1)
end
end

3 comments
Please codeblock by selecting the code and pressing the lua button. Anyways why would you want to make this?
Basically, you didn't select the player that was supposed to teleport, so it errors
ok thanks, I'll try adding a player. to allow players to move between servers. expanded game play