화면 로드 중

*이 콘텐츠는 AI(베타)를 사용해 번역되었으며, 오류가 있을 수 있습니다. 이 페이지를 영어로 보려면 여기를 클릭하세요.

Roblox는 사용자가 경험에 연결할 때 기본 로딩 화면을 표시하지만, 정적 또는 애니메이션 콘텐츠가 포함된 사용자 지정 로딩 화면으로 경험을 개인화할 수 있습니다.

사용자 지정 로딩 화면 표시

사용자 지정 로딩 화면을 표시하려면 직접 에서 인스턴스를 디자인하거나 작업 공간에서 개체를 참조할 수 있습니다.둘 다 ReplicatedFirst 을 사용하여 다른 것보다 먼저 인스턴스를 클라이언트에 복제하는 서비스를 복제합니다.이렇게 하면 사용자가 경험에 들어갈 때 처음 보는 로딩 화면이 됩니다.

LocalScripts 내에서 디자인

사용자 지정 로딩 화면을 디자인하고 표시하려면:

  1. In ReplicatedFirst 에서 LocalScript하십시오.
  2. 다음 코드 샘플을 사용하여 ScreenGui 개체를 만들고 사용자 지정합니다.디자인을 만들기 위해 자신의 값으로 다음 코드를 수정할 수 있습니다:

local Players = game:GetService("Players")
local ReplicatedFirst = game:GetService("ReplicatedFirst")
local player = Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
local screenGui = Instance.new("ScreenGui")
screenGui.IgnoreGuiInset = true
screenGui.Parent = playerGui
-- ScreenGui 값을 보유값으로 대체
local textLabel = Instance.new("TextLabel")
textLabel.Size = UDim2.new(1, 0, 1, 0)
textLabel.BackgroundColor3 = Color3.fromRGB(0, 20, 40)
textLabel.Font = Enum.Font.GothamMedium
textLabel.TextColor3 = Color3.new(0.8, 0.8, 0.8)
textLabel.Text = "Loading"
textLabel.TextSize = 28
textLabel.Parent = screenGui
-- 기본 로딩 화면 제거
ReplicatedFirst:RemoveDefaultLoadingScreen()
task.wait(5) -- 최소 시간 동안 화면 표시 강제 Force screen to appear for a minimum number of seconds
if not game:IsLoaded() then
game.Loaded:Wait()
end
screenGui:Destroy()

참조 화면 가이드

대신 를 통해 생성하는 대신, 작업 공간에서 직접 기존의 를 참조할 수도 있습니다.경험에 ScreenGui 내에 포함되고 ReplicatedFirst 내에 UI 요소가 포함된 ScreenGuiTextLabelsImageLabels 와 같은 요소가 포함된 LocalScript 가 포함되어 있는지 확인한 다음 해당 내용을 참조하여 로딩 화면으로 설정합니다.이 메서드를 사용하면 생성하는 동안 로딩 화면을 쉽게 볼 수 있습니다.

이 프로세스를 보여주기 위해, 다음 LocalScript 참조는 ScreenGui 명명된 로딩 화면 내에서 ReplicatedFirst 를 제거하여 사용자가 볼 수 있는 유일한 로딩 화면은 사용자 자신의 사용자 지정 로딩 화면입니다:


local Players = game:GetService("Players")
local ReplicatedFirst = game:GetService("ReplicatedFirst")
local player = Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
local screenGui = ReplicatedFirst.LoadingScreen
screenGui.IgnoreGuiInset = true
screenGui.Parent = playerGui
-- 기본 로딩 화면 제거
ReplicatedFirst:RemoveDefaultLoadingScreen()
task.wait(5) -- 최소 시간 동안 화면 표시 강제 Force screen to appear for a minimum number of seconds
if not game:IsLoaded() then
game.Loaded:Wait()
end
screenGui:Destroy()

애니메이션 추가

정적 사용자 지정 로딩 화면 외에도 로딩 화면을 향상시키고 로딩 진행률을 나타내기 위해 애니메이션을 추가할 수 있습니다.가장 쉬운 방법은 UI 요소(예: TextLabel 또는 ImageLabel)를 만들고, TweenService를 사용하여 애니메이션을 구현하는 것입니다.예를 들어 다음 코드 샘플은 자식 ScreenGui 을 사용하여 새로운 ImageLabel 를 생성하고, 기본 로딩 화면을 제거한 다음 TweenService 경험이 로드될 때까지 계속해서 ImageLabel 를 회전합니다.


local Players = game:GetService("Players")
local ReplicatedFirst = game:GetService("ReplicatedFirst")
local TweenService = game:GetService("TweenService")
local player = Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
local screenGui = Instance.new("ScreenGui")
screenGui.IgnoreGuiInset = true
screenGui.Parent = playerGui
local textLabel = Instance.new("TextLabel")
textLabel.Size = UDim2.new(1, 0, 1, 0)
textLabel.BackgroundColor3 = Color3.fromRGB(0, 20, 40)
textLabel.Font = Enum.Font.GothamMedium
textLabel.TextColor3 = Color3.new(0.8, 0.8, 0.8)
textLabel.Text = "Loading"
textLabel.TextSize = 28
textLabel.Parent = screenGui
local loadingRing = Instance.new("ImageLabel")
loadingRing.Size = UDim2.new(0, 256, 0, 256)
loadingRing.BackgroundTransparency = 1
loadingRing.Image = "rbxassetid://4965945816"
loadingRing.AnchorPoint = Vector2.new(0.5, 0.5)
loadingRing.Position = UDim2.new(0.5, 0, 0.5, 0)
loadingRing.Parent = screenGui
-- 기본 로딩 화면 제거
ReplicatedFirst:RemoveDefaultLoadingScreen()
local tweenInfo = TweenInfo.new(4, Enum.EasingStyle.Linear, Enum.EasingDirection.In, -1)
local tween = TweenService:Create(loadingRing, tweenInfo, {Rotation = 360})
tween:Play()
task.wait(5) -- 최소 시간 동안 화면 표시 강제 Force screen to appear for a minimum number of seconds
if not game:IsLoaded() then
game.Loaded:Wait()
end
screenGui:Destroy()