i basically want to get all the data from my main game(httprequests, the name, the ammount of players, the jobid, the placeid) and send them over to my placeholder game using the teleportservice but i dont know how as this is my first time using the teleportservice. i was going to make it a discord webhook but that was very complex for my but i still wanna try and see if it works.
here is the script for teleporting to the placeholder game:
local teleport = game:GetService("TeleportService")
local Players1 = #game:GetService("Players"):GetPlayers()
local https = pcall(function()
game:GetService('HttpService'):GetAsync('http://www.google.com/') -- Checks to see if http is enabled
end)
local data = {
name = game.Name,
id = game.PlaceId,
jobid = game.JobId,
http = https,
plrs = #game.Players:GetPlayers(),
}
game.Players.PlayerAdded:Connect(function(plr)
print(data.http) -- Starts printing data so i can see if its all working
wait(.3)
print(data.name)
wait(.3)
print(data.id)
wait(.3)
print(data.jobid)
wait(.3)
print(data.plrs)
print('teleporting')
wait(8)
teleport:Teleport(*Placeholder*, plr, data) -- Placeholder is a placeholder.
end)
here is the local script:
local tp = game:GetService("TeleportService")
local player = game.Players.LocalPlayer
local data = tp:GetLocalPlayerTeleportData()
local remote = game.ReplicatedStorage.remoteFunc -- My remotefunction
remote:InvokeServer(data.id, data.name, data.http, data.jobid, data.plrs) -- Trying to send the teleport data to a server script
print(data.id, data.name, data.http, data.jobid, data.plrs) -- Prints so i can see the
wait(8)
tp:Teleport(data.id, player) -- Teleports them back
Server script (In the SSS):
local tp = game:GetService("TeleportService")
local player = game.Players.LocalPlayer
local data = tp:GetLocalPlayerTeleportData()
local remote = game.ReplicatedStorage.remoteFunc
remote:InvokeServer(data.id, data.name, data.http, data.jobid, data.plrs)
print(data.id, data.name, data.http, data.jobid, data.plrs)
wait(8)
tp:Teleport(data.id, player)
i cant seem to get it to work can someone help?

1 comment
didnt work im getting an error