I am trying to make a server system like a story game/ TDS
This happens sometimes for some reason
I tried change the ids and remaking the places but that didn’t work
game.ReplicatedStorage.ServerCreation.ListUpdater.OnServerEvent:Connect(function(player,creator, member, num)
game.ReplicatedStorage.ServerCreation.ListUpdater:FireAllClients(creator, member, num)
end)
local tpsACCESS = 0
local Players = game.Players
local TeleportService = game:GetService("TeleportService")
local list = {}
--local id = 10229522227 -- change this place id, if you want your 1st place.
--local id2 = 10939979087 -- change this place id, if you want your 2nd place.
--local id3 = 11782799691 -- change this place id, if you want your 3rd place.
--local id4 = 0020 -- change this place id, if you want your 4th place.
--local id5 = 094 -- change this place id, if you want your 5th place.
--local id6 = 1234 -- change this place id, if you want your 6th place.
local id = 10229522227 -- FOR TESTING ONLY
local id2 = 10939979087 -- change this place id, if you want your 2nd place.
local id3 = 11782799691 -- change this place id, if you want your 3rd place.
local id4 = 125 -- change this place id, if you want your 4th place.
local id5 = 124 -- change this place id, if you want your 5th place.
local id6 = 123 -- change this place id, if you want your 6th place.
game.ReplicatedStorage.ServerCreation.Teleportation.OnServerEvent:Connect(function(player, memberList, creator, servertype)
game.ReplicatedStorage.ServerCreation.Teleportation:FireAllClients(memberList, creator)
wait(5)
if servertype == 'City' then
tpsACCESS = TeleportService:ReserveServer(id)
TeleportService:TeleportToPrivateServer(id,tpsACCESS,memberList)
tpsACCESS = 0
elseif servertype == 'Woodlands View' then
tpsACCESS = TeleportService:ReserveServer(id2)
TeleportService:TeleportToPrivateServer(id,tpsACCESS,memberList)
tpsACCESS = 0
elseif servertype == 'Millstone Port' then
tpsACCESS = TeleportService:ReserveServer(id3)
TeleportService:TeleportToPrivateServer(id,tpsACCESS,memberList)
tpsACCESS = 0
elseif servertype == 'Coming2' then
tpsACCESS = TeleportService:ReserveServer(id4)
TeleportService:TeleportToPrivateServer(id,tpsACCESS,memberList)
tpsACCESS = 0
elseif servertype == 'Coming3' then
tpsACCESS = TeleportService:ReserveServer(id5)
TeleportService:TeleportToPrivateServer(id,tpsACCESS,memberList)
tpsACCESS = 0
elseif servertype == 'Coming4' then
tpsACCESS = TeleportService:ReserveServer(id6)
TeleportService:TeleportToPrivateServer(id,tpsACCESS,memberList)
tpsACCESS = 0
end
end)
game.ReplicatedStorage.ServerCreation.TeleportationMain.OnServerEvent:Connect(function(player, member)
print(list)
table.insert(list, member)
end)
game.ReplicatedStorage.ServerCreation.TeleportSolo.OnServerEvent:Connect(function(player, memberList, creator, servertype)
game.ReplicatedStorage.ServerCreation.Teleportation:FireAllClients({player}, creator)
print(servertype)
wait(5)
if servertype == 'City' then
tpsACCESS = TeleportService:ReserveServer(id)
TeleportService:TeleportToPrivateServer(id,tpsACCESS,{player})
tpsACCESS = 0
elseif servertype == 'Woodlands View' then
tpsACCESS = TeleportService:ReserveServer(id2)
TeleportService:TeleportToPrivateServer(id,tpsACCESS,{player})
tpsACCESS = 0
elseif servertype == 'Millstone Port' then
tpsACCESS = TeleportService:ReserveServer(id3)
TeleportService:TeleportToPrivateServer(id,tpsACCESS,{player})
tpsACCESS = 0
elseif servertype == 'Coming2' then
tpsACCESS = TeleportService:ReserveServer(id4)
TeleportService:TeleportToPrivateServer(id,tpsACCESS,{player})
tpsACCESS = 0
elseif servertype == 'Coming3' then
tpsACCESS = TeleportService:ReserveServer(id5)
TeleportService:TeleportToPrivateServer(id,tpsACCESS,{player})
tpsACCESS = 0
elseif servertype == 'Coming4' then
tpsACCESS = TeleportService:ReserveServer(id6)
TeleportService:TeleportToPrivateServer(id,tpsACCESS,{player})
tpsACCESS = 0
end
tpsACCESS = 0
end)