Hello,
I am making a story game, and for the ending part, the player gets teleported to a new place. The problem is that the player sometimes freezes when they join, they are stuck in the air, and the game is frozen for them in the new place. This never happens to me though.
Teleportation script:
for _, player in pairs(game.Players:GetPlayers()) do
local teleportData = {
health = player.Character.Humanoid.Health,
tools = {}
}
for _, tool in pairs(player.Backpack:GetChildren()) do
table.insert(teleportData.tools,tool.Name)
end
for _, tool in pairs(player.Character:GetChildren()) do
if tool:IsA('Tool') then
table.insert(teleportData.tools,tool.Name)
end
end
teleportService:TeleportToPrivateServer(5844872161, code, {player}, nil, teleportData)
end
Screenshot:
Help is appreciated!