Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make a plugin detect what a player is selecting?

Asked by
Rawblocky 217 Moderation Voter
6 years ago

I've been trying to find this for so long. I'm working on a plugin. I have attempted to find something on the wiki, but I just can't find it. Multiple plugins detect what the player is selecting.

I've also tried finding using PluginMouse but I can't find it. Please help.

1 answer

Log in to vote
1
Answered by 6 years ago

Simple. When using plugins, there is a thing called Selection and it has a function called Get() which returns an array of everything selected. Here's an example code of what you can use it for:

for i, v in ipairs(game.Selection:Get()) do
    print(v..'is selected')
end
0
Tysm! Rawblocky 217 — 6y
Ad

Answer this question