Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

The current identity (2) cannot Source (lacking permission 1) script.Source? [SOLVED]

I want to make make a virus detector on my game and i used script.Source but it give me this error.

Did i use script.Source the wrong way?

LocalScript:

local requires = 0
for _,t:Script in pairs(game.Workspace:GetDescendants()) do
	if t:IsA("Script") then
	if not string.find(t.Parent.Name, "Class") and t.Name ~= "handler" then
		if string.find(t.Source, "require") then --This line
			requires += 1
		end
		end
	end
end

script.Parent.Requires.Text = "Requires: ".. tostring(requires)

1 answer

I found out that script.Source cannot be used in a Script or a LocalScript.

I'm gonna make this a plugin :)

This discussion is preserved as it was. New answers, comments, and votes are closed.