概要
属性
方法
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