So, you know when you use the TeleportService to teleport a player and you can insert a custom loading GUI? How would I make it so that after it teleports the player, it stays forever?
If the destination place is also your game, you can place the same GUI (the loading one) inside of StarterGui to give it to the player again upon joining the destination place. There is no way to keep the custom loading GUI directly through TeleportService.
If the destination place is NOT yours, you'll have to contact the developer to have them put it in the game.
We can set a CustomLoadingScreen to be shown while the player is teleporting, then after the player has arrived at the destination we can remove that gui using the gui instance that LocalPlayerArrivedFromTeleport gives us (Or you could not destroy it resulting in it stay there :P I'm guessing like how you want)
**But scripts and tweening will not work with this! ** Lets start by teleporting the player,
game:GetService('TeleportService'):Teleport(1818, game.Players.Player1)
Your normal teleport line right? But we can also give :Teleport more things to work with,
void Teleport ( int placeId, Player player = nil, Variant teleportData, ScreenGui customLoadingScreen = nil )
Basically this is like,
:Teleport(placeID,THEPLAYER,ATABLE(USEFUL :D),ThisISTheGUI!!!!!)
We can send it a useful table of information we want to send over and the custom loadinggui.
Lets make the script,
local guitosend = script.Parent.Gui --CHANGE to the gui your sending!!! local info = {} --atm this table is empty local id = 1231234 game:GetService('TeleportService'):Teleport(id, game.Players.Player1,info,guitosend)
There we go, we have our teleporting from place setup now lets go to where they'll be arriving.
We are going to setup a local script that will fire when someone is arriving from teleporting.
This will be a localscript and it will be located inside ReplicatedFirst
We will use LocalPlayerArrivedFromTeleport event from the teleport service to fire this code
game:GetService('TeleportService').LocalPlayerArrivedFromTeleport:connect(function(customLoadingScreen, teleportData) end)
As you can see it gave us two values, the gui that we sent over from the other game and that empty table we set called info
right now the code is not running anything so the gui will remain on your screen forever. But you could wait for the character to spawn in and then remove it with cutomLoadingScreen:Destroy() but the choice is yours :)