배우기
엔진 클래스
Selection
만들 수 없음
서비스

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


요약
메서드
Add(instancesToAdd: Instances):()
Get():Instances
Remove(instancesToRemove: Instances):()
Set(selection: Instances):()
상속된 멤버
코드 샘플
선택
local Selection = game:GetService("Selection")
for _, object in pairs(Selection:Get()) do
if object:IsA("BasePart") then
object.CFrame = object.CFrame * CFrame.Angles(0, math.pi / 2, 0)
end
end

API 참조
속성
SelectionThickness
읽기 전용
복제되지 않음
병렬 읽기
기능: Basic
Selection.SelectionThickness:number

메서드
Add
플러그인 보안
기능: Basic
Selection:Add(instancesToAdd:Instances):()
매개 변수
instancesToAdd:Instances
반환
()

Get
플러그인 보안
기능: Basic
Selection:Get():Instances
반환
Instances
코드 샘플
선택
local Selection = game:GetService("Selection")
for _, object in pairs(Selection:Get()) do
if object:IsA("BasePart") then
object.CFrame = object.CFrame * CFrame.Angles(0, math.pi / 2, 0)
end
end
선택.선택변경됨
local selection = game:GetService("Selection")
selection.SelectionChanged:Connect(function()
print("선택에는 " .. #selection:Get() .. " 항목이 있습니다.")
end)

Remove
플러그인 보안
기능: Basic
Selection:Remove(instancesToRemove:Instances):()
매개 변수
instancesToRemove:Instances
반환
()

Set
플러그인 보안
기능: Basic
Selection:Set(selection:Instances):()
매개 변수
selection:Instances
반환
()
코드 샘플
선택 집합
local Selection = game:GetService("Selection")
local newSelection = {}
for _, object in pairs(workspace:GetDescendants()) do
if object:IsA("BasePart") and object.BrickColor == BrickColor.new("Bright red") then
table.insert(newSelection, object)
end
end
Selection:Set(newSelection)

이벤트
SelectionChanged
기능: Basic
Selection.SelectionChanged():RBXScriptSignal
코드 샘플
선택.선택변경됨
local selection = game:GetService("Selection")
selection.SelectionChanged:Connect(function()
print("선택에는 " .. #selection:Get() .. " 항목이 있습니다.")
end)

©2026 Roblox Corporation. Roblox 및 Roblox 로고, 'Powering Imagination'은 미국 및 기타 국가 내 당사의 등록 및 미등록 상표입니다.