概要
屬性
方法
GetCurrentPlayers():Instances |
活動
DialogChoiceSelected(player: Instance,dialogChoice: Instance):RBXScriptSignal |
API 參考
屬性
方法
GetCurrentPlayers
Dialog:GetCurrentPlayers():Instances
返回
Instances
範例程式碼
對話框:獲取當前玩家
local dialog = script.Parent
local function onChoiceSelected(_player, _choice)
local currentPlayers = dialog:GetCurrentPlayers()
print("當前在對話框中的玩家:")
for _, player in ipairs(currentPlayers) do
print(player)
end
end
dialog.DialogChoiceSelected:Connect(onChoiceSelected)活動
DialogChoiceSelected