Lớp công cụ
Dialog
*Nội dung này được dịch bằng AI (Beta) và có thể có lỗi. Để xem trang này bằng tiếng Anh, hãy nhấp vào đây.
Tóm Tắt
Thuộc Tính
Phương Pháp
GetCurrentPlayers():Instances |
Sự Kiện
DialogChoiceSelected(player: Instance,dialogChoice: Instance):RBXScriptSignal |
Tài Liệu Tham Khảo API
Thuộc Tính
Phương Pháp
GetCurrentPlayers
Dialog:GetCurrentPlayers():Instances
Lợi Nhuận
Instances
Mẫu mã
Hộp thoại:LấyNhữngNgườiChơiHiệnTại
local dialog = script.Parent
local function onChoiceSelected(_player, _choice)
local currentPlayers = dialog:GetCurrentPlayers()
print("Những người chơi hiện tại trong hộp thoại:")
for _, player in ipairs(currentPlayers) do
print(player)
end
end
dialog.DialogChoiceSelected:Connect(onChoiceSelected)Sự Kiện
DialogChoiceSelected