hello there, i'm making a script that teleport's you to a other game BUT it sends other data as well

BUT

now when i send the table..there is nothing

i make a local script in the button that puts the data the model script

and this i made a scipt that requires the model script and then send it to the other game

local script (this is not the whole script, this this just the table.insert part)

		 	local SkinsAndEmotes = require(script.Parent.Parent.Parent.Parent.Parent.SkinsAndEmotes)
			if item.ClassName == "Model" then
				table.insert(SkinsAndEmotes.Emote, script.Parent.Parent.Parent.Item.Value.Name)
				else
				table.insert(SkinsAndEmotes.skins, script.Parent.Parent.Parent.Item.Value.Name)
				end

sever script (this is the whole script)

script.Parent.JoinGame.OnServerEvent:Connect(function(Player, Server)
	for _, player in pairs(Server:GetChildren()) do
		local Player = game.Players:GetPlayerFromCharacter(player)
		local SkinsAndEmotes = require(script.Parent.Parent.Parent.SkinsAndEmotes)
		game:GetService('TeleportService'):Teleport(4576345473, Player, SkinsAndEmotes)
		print(#SkinsAndEmotes.Emote)
		print(#SkinsAndEmotes.skins)
		end
	end)

please help

2 comments

0

You'll need to open up your datastore in the second game anyway, so you may want to just save to the datastore before sending the player, then open the datastore(s) in the second game.

0

Oh my word thank you, now i can save the players stuff as well, i cant believe i did not think of that, thank you