-
What do you want to achieve?
I’m making a plugin with useful tools for scripts. There’s a selector menu to select scripts in the game. -
What is the issue?
I’m not sure how to get a table of scripts that only has scripts created by the user. When I get all the scripts, I get scripts that are even hidden:
None of the following scripts are visible anywhere in the explorer and ctrl+shift+f doesn’t show them either. It’s really annoying to have over 1.5 thousand scripts in a tiny scrolling frame when only about 10 of them are actually made by the user. -
What solutions have you tried so far?
I wrapped the script-finder function in a pcall to make sure I don’t get any core scripts to error my code but I honestly don’t have any other solutions.
This is the segment of my plugin script that checks if the given instance is a valid script:
local function checkIfScript(inst)
local isgood = false
local s,e = pcall(function()
if inst:IsA("Script") or inst:IsA("LocalScript") or inst:IsA("ModuleScript") then
if inst.Parent.Name ~= "KasCode Script Tools"
and inst.Parent.Name ~= "KCSTSelector"
and not scrollingframe:FindFirstChild(inst.Name) then
isgood = true
end
end
end)
return isgood
end