Getting a plugin's ID from the plugin's environment

How can I get the ID of the plugin that is being ran from inside its script?

For example, assume this is the main plugin script:

local pluginID = ... --make this the ID of the plugin this script is published to

string.match(pluginBase.Parent.Name,"%d+") for published plugins will return the ID

1 Like