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

Can I detect local scripts added into the game?

Is there any function that allows me to detect any local scripts added to the game that are not by the game itself? Or just in general? My best guess is something to do with getfenv() but I'm not very good at understanding how that works.

2 answers

✓ Accepted answer

getfenv() has nothing to do with local scripts and everything to do with environment manipulation. Anyway I think you want something with DescendantAdded so here you go.

In a local script of course

local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer

LocalPlayer.DescendantAdded:Connect(function(Descendant)
	print(Descendant) -- idk do your code here
end)
while wait() do
    m = Instance.new"Message"
    m.Text = "ScriptingHelpers.org is a HELP site, not a request site!"
    m.Parent = game.Workspace
end

3 comments

0

I cannot understand how you think he is requesting a script made for him.

0

He used "game.Workspace" and not "workspace" lol

0

I like game.Workspace, it fits with everything else, workspace is the black sheep, it's just sorta there.

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