This is my plugin code the error happens at line 15. When i run GetHash() in a command line it works fine why is this happening?

print("Loading Hash Plugin...")
 
-- Setup Toolbar
local toolbar = plugin:CreateToolbar("Hash Plugin")
 
-- Setup button
local button = toolbar:CreateButton(
	"Get Hash/Hashes",
	"Select all scripts you want to get the hash of and click this button",
	"http://www.roblox.com/asset/?id=0"
)
button.Click:connect(function()
	for i,v in ipairs(game.Selection:Get()) do 
		if v.ClassName == "Script" or "LocalScript" or "ModuleScript" then
			print(v.Name," Hash: ",v:GetHash())
		end
	end
end)

print("Finished Loading Hash Plugin")

2 comments

0

"This member cannot be used in scripts, but is usable in the command bar and plugins." - Roblox Wiki. I'm not sure why, this was made with the label "Roblox Place Security" next to it, though.