Hello,
My better half and myself have been trying to solve a bug with a plugin I have been working on. The plugin is designed to spawn a part or mesh where clicked. The main function of this works however we haven’t figured out how to tell the code to deactivate properly. Instead, it deactivates but when reactivated, it begins spawning them in 2’s and adds a part/mesh per time the plugin is turned off and on. We’ve spent hours yesterday trying to solve this and we had a hard time finding a solution on the wiki.
This is the deactivation statement which is throwing the error:
plugin.Deactivation:connect(function()
activated = false
plugin:SetActive(false)
end)
“SetActive is not a valid member of Plugin”
Is there a different and proper way of writing this statement?