Script In Game1
local rep = game:GetService("ReplicatedStorage")
local Chose = rep:WaitForChild("Chose")
local TeleportService = game:GetService("TeleportService")
Chose.OnServerEvent:Connect(function(Player,Game,Lvl)
print(Lvl)
wait(2)
TeleportService:Teleport(Game,Player,Lvl)
end)
Local Script In Game1 -- Fires Event To Teleport
local Game = 2039763250
local Player = game.Players.LocalPlayer
local Levels = script.Parent:WaitForChild("Levels")
local LvlInfo = script.Parent:WaitForChild("LvlInfo")
local rep = game:GetService("ReplicatedStorage")
local Chose = rep:WaitForChild("Chose")
Levels.a.MouseButton1Click:Connect(function()
local Desc = Levels.a.Desc
local Name = Levels.a.Namee
local Img = Levels.a.Img
LvlInfo.Visible = true
LvlInfo.LvlImg.Image = Img.Value
LvlInfo.LvlName.Text = Name.Value
LvlInfo.LvlDesc.Text = Desc.Value
end)
Levels.b.MouseButton1Click:Connect(function()
local Desc = Levels.b.Desc
local Name = Levels.b.Namee
local Img = Levels.b.Img
LvlInfo.Visible = true
LvlInfo.LvlImg.Image = Img.Value
LvlInfo.LvlName.Text = Name.Value
LvlInfo.LvlDesc.Text = Desc.Value
end)
LvlInfo.Play.MouseButton1Click:Connect(function()
Chose:FireServer(Game,tostring(LvlInfo.LvlName.Text))
end)
Script In Game2
local TeleData = game:GetService("TeleportService"):GetLocalPlayerTeleportData()
print(TeleData)
When I want it to print TeleData it prints nil ?
