I’m currently messing around with the customteleportui. And I’m really stumped on this script in the Developer Article. And here’s the script:
-- Local script in other place
-- Declare local variables for Roblox Services
local TeleportService = game:GetService('TeleportService')
local UserInputService = game:GetService('UserInputService')
local StarterGui = game.StarterGui
-- Hide Core GUI and mouse
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
UserInputService.MouseIconEnabled = false
-- Bind function to teleport arrival
TeleportService.LocalPlayerArrivedFromTeleport:Connect(function(loadingGui, data)
-- Pause briefly to allow level to load
wait(2)
-- Fade out loading screen
for i = 0, 1, .05 do
loadingGui.loadingScreenFrame.BackgroundTransparency = i
wait()
end
loadingGui.loadingScreenFrame.BackgroundTransparency = 1
-- Show Core GUI and mouse
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, true)
UserInputService.MouseIconEnabled = true
end)
Basically what my problem is that, I’m trying to get something like this:
But instead I end up with this:
And here’s the code I’m using for the arrived function: local loadingScreen = script.Loading
local TeleportService = game:GetService("TeleportService")
local PlayerGui = game.Players.LocalPlayer.PlayerGui
TeleportService.CustomizedTeleportUI = true
local loadingScreenClone = loadingScreen:Clone()
loadingScreenClone.Parent = PlayerGui
TeleportService.LocalPlayerArrivedFromTeleport:Connect(function(loadingGui, data)
wait(2)
loadingScreenClone.Frame.Visible = false
end)
And this script is located in ReplicatedFirst. Any help?
local gui = script.LoadingScreen
local z = gui:Clone()
z.Parent = pgui
local rf = game:GetService("ReplicatedFirst")
rf:RemoveDefaultLoadingScreen()
repeat wait() until game:IsLoaded()
z:Destroy()
local ts = game:GetService("TeleportService")
local rf = game:GetService("ReplicatedFirst")
local z = ts:GetArrivingTeleportGui()
rf:RemoveDefaultLoadingScreen()
z.Parent = game.Players.LocalPlayer.PlayerGui
wait(10)
z:Destroy()