Selection:Set() not working?

So I’m trying to set the selected object with a plugin, but I get this error:
“Unable to cast value to Objects”

local selection = game:GetService("Selection")
selection:Set(game.Workspace.Part)

I thought the :Set() method only takes a table as an argument?

I tried that too and it still had the same error.


local selection = game:GetService("Selection")
selection:Set({game.Workspace.Part})

Yeah I just had a silly mistake XD. Thanks though.

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