Roblox data between place id

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!

so i want to send data from servers to another server with data store so the server that get the data and make gui so like people can se servers and join them

  1. What is the issue? Include screenshots / videos if possible!
    well it seems like only one server can send data like one server delete the others servers data
    and gives no errors

  2. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    i tried to look around but diden’t find any thing i asl tried changing the code many times

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

-- This is an example Lua code block

so i have very many codes but here are the most importent ones code 1

wait(4)
local value10 = ""
while true do
local Players = game:GetService("Players")
local DataStoreService = game:GetService("DataStoreService")
local DataStore = DataStoreService:GetDataStore("ServersDS")
local value = 1

local serversnummber = 0

   local Data = DataStore:GetAsync(value.."-Servers")
   print(Data)


   --if Data ~= nil then
   
   
   
   
   	------------for i=1,#Data do
   		-----------print("loop")
   		----------local server = Data[i]
   		---------local id = 0
   		--------print(server)
   		------------print(Data)
   	---------end
   	
   	
for key2, value2 in pairs(Data) do
   	print(value10,key2)
   	if value10 == key2 then
   		
   	else
   		print("neverrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr")
   	end
   	value = key2
   	serversnummber += 1
   	print(serversnummber)
   	print(value2["server"..serversnummber])
   	print(serversnummber)
   	print(key2)
   	print(value2)
   	game.ReplicatedStorage.events.servercreate:FireAllClients(value2[key2],key2)   --(value2["server"..serversnummber],key2)
   
end
   	
   	
   	
   	--else
   --DataStore:SetAsync(value.."-Servers", {})
   --end
--end
wait(9)
   --DataStore:SetAsync(value.."-Servers", {})
   wait(1)
end




   --DataStore:SetAsync(player.UserId.."-Points", points)

--local info = {nil}
--DataStore:SetAsync(value.."-Servers", info)``` this code will send all data to a locolscript that wil then make the gui




local Players = game:GetService(“Players”)
local DataStoreService = game:GetService(“DataStoreService”)
local DataStore = DataStoreService:GetDataStore(“ServersDS”)
local value = 1
local value1 = 1

local Data = DataStore:GetAsync(value…“-Servers”)

print(Data)
–if Data ~= nil then
–print(“data is not nil”)
–print(#Data)
–for i=1,#Data do
– value1 += 1
– print(value1…“iiiiiiiiiiiiiiiiiiiiiiiiiiiiii”)
–end

–end

for key, _ in pairs(Data) do

	value1 += 1
	print()

end

–print(value1)

local info = { [“server”…value1] = {value1,game.Workspace.values.Res.Value,
game.Workspace.values.players.Value,
game.Workspace.values.Code.Value,
game.Workspace.values.track.Value,
game.Workspace.values.map.Value,
game.Workspace.values.cartype.Value,
game.Workspace.values.public.Value}}
Data[“server”…value1] = info
game.Workspace.values.Key.Value = “server”…value1
–table.insert(Data,info)

–local info = Data
–print(Data)
–print(info)
DataStore:SetAsync(value…“-Servers”, info)
–print(Data)
–end

info[“server”…value1] = nil

game:BindToClose(function()
print(“server shutdown”)
DataStore:SetAsync(value…“-Servers”, info)
end)

this will make a server in another place id





local Players = game:GetService(“Players”)
local DataStoreService = game:GetService(“DataStoreService”)
local DataStore = DataStoreService:GetDataStore(“ServersDS”)
local value = 1
local value1 = 0
local copykey = “”

–for key, _ in pairs(Data) do

--value1 += 1

–print(value1)
–end
while true do
local Data = DataStore:GetAsync(value…“-Servers”)
print(“before”)
print(Data)
value1 = 1
for key, _ in pairs(Data) do
if key == game.Workspace.values.Key.Value then

	value1 += 1
	
	copykey = key
	print(value1,copykey)
	if copykey == "" then
		copykey = "server1"
	end

	--local info = { Data,  ["server"..value1] = {value1,game.Workspace.values.Res.Value,
	--game.Workspace.values.players.Value,
	--game.Workspace.values.Code.Value,
	--game.Workspace.values.track.Value,
	--game.Workspace.values.map.Value,
	--game.Workspace.values.cartype.Value,
	--game.Workspace.values.public.Value}}






	local info = { [key] = {value1,game.Workspace.values.Res.Value,        --["server"..value1],[copykey]
		game.Workspace.values.players.Value,
		game.Workspace.values.Code.Value,
		game.Workspace.values.track.Value,
		game.Workspace.values.map.Value,
		game.Workspace.values.cartype.Value,
		game.Workspace.values.public.Value}}
	--print(Data)
	Data[key] = info      --Data["server"..value1] = info ,[copykey]
	print("after")
	print(Data)
	--table.insert(Data,info)

	--local info = Data

	--print(info)
	DataStore:SetAsync(value.."-Servers", Data)
	--print(info)
	--DataStore:SetAsync(value.."-Servers", info)
	end
end

--if copykey == "" then
--	copykey = "server1"
--end

–local info = { Data, [“server”…value1] = {value1,game.Workspace.values.Res.Value,
–game.Workspace.values.players.Value,
–game.Workspace.values.Code.Value,
–game.Workspace.values.track.Value,
–game.Workspace.values.map.Value,
–game.Workspace.values.cartype.Value,
–game.Workspace.values.public.Value}}

----------local info = { ["server"..value1] = {value1,game.Workspace.values.Res.Value,        --["server"..value1],[copykey]
------	game.Workspace.values.players.Value,
-----------	game.Workspace.values.Code.Value,
	---game.Workspace.values.track.Value,
	---game.Workspace.values.map.Value,
	---game.Workspace.values.cartype.Value,
	---game.Workspace.values.public.Value}}
--print(Data)
--Data["server"..value1] = info      --Data["server"..value1] = info ,[copykey]
--print("after")
--print(Data)
--table.insert(Data,info)

--local info = Data

--print(info)
--DataStore:SetAsync(value.."-Servers", Data)

–pr—int(info)
–DataStore:SetAsync(value…“-Servers”, info)
wait(10)
end

this will send new data every 10s from another place id 

Please do not ask people to write entire scripts or design entire systems for you. If you can't answer the three questions above, you should probably pick a different category.

this is also my first time doing a topic