PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

GetCurrentPlayers

The GetCurrentPlayers function of a Dialog will return a list of Player currently using the Dialog. If there are no players using the dialog then the returned list will be empty.

Returns

Return Type Summary

Code Samples


Dialog:GetCurrentPlayers

local dialog = script.Parent

local function onChoiceSelected(player, choice)
	local currentPlayers = dialog:GetCurrentPlayers()
	print("The current players in the dialog:")
	for _, player in ipairs(currentPlayers) do
		print(player)
	end
end

dialog.DialogChoiceSelected:Connect(onChoiceSelected)