[Old] Roblox Engine API Expander

Roblox Engine API Expander

Overview

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.
  • FindFirstDescendant method (Should only be used if FindFirstDescendant gets disabled).
  • GetDescendants method (Should only be used if GetDescendants gets disabled).

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.

13 Likes

I will look forward to this resource. It is a nice one!!

1 Like

I’d recommend updating your resource to use Promise library so it can be a lot more versatile

1 Like

Thanks for the feedback, I’ll check it out.

Nice work, I’m going to pretend I completely didn’t know about this from the DMs. :slight_smile:

1 Like

Update

I’ve completely reworked the module, allowing to call functions of the API expander directly from the instance instead of having to pass the instance as a parameter. An example of this can be found below:

local Instances = require(script.Parent.Parent)
local workspace = Instances:Register(workspace)
print(workspace:GetChildrenWhichAre("ModuleScript"))

Whereas before you would have had to pass the instance as a parameter of the GetChildrenWhichAre function.

local Instances = require(script.Parent.Parent)
print(Instances:GetChildrenWhichAre(workspace, "ModuleScript"))

Check out the following thread for more information.