This is a completely reworked version of the original API expander I made some time ago, you can still find the old one in this thread.
Hello everyone! While developing on Roblox Studio, I stumbled upon an issue when trying to use methods in instances which I believed should be there by default, methods such as WaitForChildWhichIsA or GetChildrenOfClass. These methods don’t exist by default and I believe they should be there without any extra steps.
That’s why I decided to make this simple module. As its title says, it expands the methods provided by the Engine API, specifically methods that can be used on all kinds of instances, adding the methods mentioned before and more.
Features
WaitForChildWhichIsA method.
GetDescendantsWhichAre method.
GetDescendantsOfClass method.
GetChildrenOfClass method.
GetChildrenWhichAre method.
FindFirstSibling method.
IsSiblingOf method.
FindFirstSiblingWhichIsA method.
FindFirstSiblingOfClass method.
GetSiblings method.
.SiblingRemoved signal.
.SiblingAdded signal.
Now you can directly call methods from instances instead of having to pass the instance as a parameter:
local Instances = require(script.Parent.Parent)
local workspace = Instances:Register(workspace)
print(workspace:GetChildrenWhichAre("ModuleScript"))
The source code can be found open source on GitHub and can be simply imported into Roblox Studio using the following model .
Feel free to contribute by making a pull request in the GitHub repository.
Any feedback is appreciated, I hope this module is useful and solves the following issue.
I know but sometimes some methods get disabled for some reason, that’s why I provide an alternative if they are disabled. From what I know FindFirstDescendant is fully disabled now so FindFirstChild recursive should be used instead.
Always been disabled from the start. That’s not how versioning works if you think that GetDescendants will be removed. That’s like saying ffc will be removed because something is disabled.
It is completely up to the user to use the latest version or the older version so I don’t see why it’s a problem, You aren’t being forced to use the latest version unless you are using a package which this model isn’t