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

Selection.SelectionChanged

Selection.SelectionChanged

Oct 01 2018, 1:54 AM PST

This example prints the number of selected items whenever SelectionChanged is fired:

local selection = game:GetService("Selection")
selection.SelectionChanged:Connect(function()
	print("Selection contains " .. #selection:Get() .. " items.")
end)