Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
2

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

Asked by 6 years ago
Edited 6 years ago

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?

0
Check the event, Im geussing you have it set to destroy a certain thing but your accedently destroying the whole GUI Sergiomontani10 236 — 6y
0
I'm not destroying anything. Naxxanar 77 — 6y
0
Do you remove the default load screen? User#5423 17 — 6y
0
No. Naxxanar 77 — 6y
0
Tried it just now; no difference. Naxxanar 77 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

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)
Ad

Answer this question