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

Custom loading screen does not appear at TeleportToPrivateServer? Why?

Asked by
WoTrox 345 Moderation Voter
4 years ago

Here's the full (server) script inside the button:

local tserv = game:GetService("TeleportService")
local Players = game:GetService("Players")
local playerss = script.Parent.Parent.Parent.Parent.Parent -- I don't know how to do LocalPlayer inside a server script
local placeid = 3315989953
local code = tserv:ReserveServer(placeid)
local gui = game.ReplicatedStorage.TeleportGui:Clone()
tserv:SetTeleportGui(gui)

script.Parent.MouseButton1Click:Connect(function()

    gui.Parent = script.Parent.Parent.Parent.Parent.Parent.PlayerGui
    tserv:TeleportToPrivateServer(placeid, code, playerss, gui)

end)

No error code, it teleports me to the place, but the teleport screen is the default, not mine. Any help?

Answer this question