I’ve been searching and nothing fits the thing I want, I’m trying to teleport a player or a group of players to a place(this part is done) and then on the other place know how many players were sent, and if any of them left. I’ve tried looking at TeleportData but not only have I not been able to make it work, I also found a post saying since it’s on the client side it can be manipulated.
Can you elaborate more on this? I would like to help but the two sentences above are very jumbled, and don’t make much sense. Could you also post the code you currently have?
i’m sorry for the delay. What I was trying to say was if I could somehow know the amount of players that teleport to another place without using teleport data since I’ve hear people say it’s really bad because client can manipulate the data. All I have for the code right know is the teleport to another place.
Script to teleport(it’s working fine)
while true do
task.wait(1)
Timer = 5
TimeNumber.Text = Timer
if #Players == PlayersAllowed.Value then
for i = 1, Timer do
if #Players == PlayersAllowed.Value then
TimeNumber.Text = Timer
Timer = Timer - 1
task.wait(1)
else
Timer = 5
TimeNumber.Text = Timer
end
end
if Timer == 0 then
TimeNumber.Text = Timer
for k, v in pairs(Players) do
ExitEvent:FireClient(v)
end
local PrivateCode = TeleportService:ReserveServer(6325626491)
TeleportService:TeleportToPrivateServer(6325626491, PrivateCode, Players)
task.wait(4)
table.clear(Players)
RefreshPlayers()
end
end
end
My question is, if the player leaves in the middle of joining the game I can’t know for sure if he has bad hardware or if he left right? And also that helps me know if the tp failed but I wouldn’t be able to know all the ones that teleported would I?
This is possible, but there is also another way using Cross-Server Messaging. You can send a table containing all the players who should be teleported to the reserved server. Then, create a simple code that waits for about 1 minute and checks if all players from the given table are in the server.
Ok that makes sense, thank you I’ll try that as soon as I can.
If you still need help let me know.
Sorry for the delay I was having classes so I couldn’t test it out. It’s working though thank you very much.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.