Advertisement
cuhieu9xk

Sử dụng màn hình loading mới kết hợp với Teleport - Start

Dec 10th, 2019
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. -- Đầu tiên thiết lập GUI mờ dần để dịch chuyển đẹp mắt hơn.
  2. local PlayerGui = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  3. PlayerGui:SetTopbarTransparency(0)
  4.  
  5. local screen = Instance.new("ScreenGui")
  6. screen.Parent = PlayerGui
  7.  
  8. local textLabel = Instance.new("TextLabel")
  9. textLabel.Text = "Teleporting"
  10. textLabel.Size = UDim2.new(1,0,1,0)
  11. textLabel.FontSize = Enum.FontSize.Size18
  12. textLabel.BackgroundTransparency = 1
  13. textLabel.Parent = screen
  14.  
  15. spawn(function()
  16. for i = 50, 0, -1 do
  17. textLabel.BackgroundTransparency = i/50
  18. wait()
  19. end
  20. end)
  21.  
  22. -- Khởi động dịch chuyển tức thời, chuyển GUI đang tải mà bạn muốn sử dụng làm tham số.
  23. game:GetService("TeleportService"):Teleport(PLACE_ID, game.Players.LocalPlayer, {}, game.ReplicatedStorage.LoadingGUI)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement