Bringing Over Items and Values When Teleporting to a Different Place

nevermind… this is frustrating. it doesnt read the data. it did it once but now its not doing it anymore.

Not sure why you would put them on the workspace but there you go … A goes to B.
Yes, that block is the portal … (can edit them games for the scripts).

I believe you can use Data Store Service

Yeah, but h o w ? ? ? (char limit)

ok this works but like why would you make the tools go client sided cuz then they dont work
Edit: i found out v is a string so we cant do v.Name cuz then its just nil

I just tried to mimic what you were doing. I’d probably place most all of that in different spots.
More of a testing faze just to get it working …

heres the thing that gets the data

task.wait(3)

local rs= game:GetService("ReplicatedStorage")
local ts = game:GetService("TeleportService")
local td = ts:GetLocalPlayerTeleportData()
if td ~= nil then
	for i, v in pairs(td) do
		print(v)
		game.ReplicatedStorage.Remotes.getData:FireServer(v, game.Players.LocalPlayer)
	end
end

when i go in with almond water, it prints almond water. so thats working. but this script

game.ReplicatedStorage.Remotes.getData.OnServerEvent:Connect(function(plr, v, localPlayer)
	print("recieved")
	print(v)
	if game.Workspace:FindFirstChild(v) then
		local Item = workspace[v]:Clone()
		Item.Parent = localPlayer.Backpack
	end
end)

prints “nil” and “received”

People here will advise you to transfer data over the teleport, however exploiters can spoof this. Instead you need to implement data saving into your game, Roblox data stores are the same for places under the same experience, so if you save a tool in the player data in one place(before you teleport them) you can then fetch it on the other(however you can’t save instances directly, so you have to save the name of the tool instead and have a copy of it inside the ServerStorage of the other place to convert it back to instance and clone it to the player inventory).

Although you can send configurations/settings through teleport data. But you must validate them on the server of the other place(for example if the client says they have a tool equipped, check if they own said tool and can equip it).

how would i do that? that seems complicated id rather just stick with what i have now cuz exploiters having a ton of almond water isnt really a big deal

Teleport Data is much faster and more reliable. You can just do some sanity checks on the server.

I fixed GameA and GameB … It now works as intended.

The local script had to read the teleport data so I just used RemoteEvents to trigger the items to the backpack. Not sure why I didn’t think of that the 1st time … This may even be secure.