How do I tell when something is selected, VS telling if at the time something is selected

So I want to know how to make a script wait until something is selected(Selection Service)

I know how to tell if something is selected at the time, but I want to be able to wait till something is selected

Maybe try this:

local selection = game:GetService("Selection")

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

or this:

Selection:Get():Wait()
2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.