Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I make my Loading Gui not disappear when arriving to the place?

Title says it all, I have a Loading Gui where I want it to fade when the player arrives to the destinated place, however when the "LocalPlayerArrivedFromTeleport" event is fired, it instantly gets removed.

What am I doing wrong?

Code snippets:

--// A
local TS = game:GetService("TeleportService")

TS:Teleport(PlaceId, Player, nil, ScreenGui)
--// B
local TS = game:GetService("TeleportService")

TS.LocalPlayerArrivedFromTeleport:Connect(function(ScreenGui)
	--// Stuff
end)

Is what I want to happen even possible?

5 comments

0

Check the event, Im geussing you have it set to destroy a certain thing but your accedently destroying the whole GUI

0

I'm not destroying anything.

0

Do you remove the default load screen?

0

No.

0

Tried it just now; no difference.

1 answer

Inside your LocalPlayerArrivedFromTeleport, check if the UI exists, and if it does re-parent it. That seems to work for me.

--// B
local TS = game:GetService("TeleportService")

TS.LocalPlayerArrivedFromTeleport:Connect(function(ScreenGui)
    if ScreenGui then
        ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
    end
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.