Skip to content
This repository has been archived by the owner on Jul 22, 2023. It is now read-only.

Add a function which checks if X is a service #57

Open
railworks2 opened this issue Jun 20, 2021 · 2 comments
Open

Add a function which checks if X is a service #57

railworks2 opened this issue Jun 20, 2021 · 2 comments

Comments

@railworks2
Copy link

At the moment, it's very tedious to identify that is and isn't a Roblox service. It may more sense to add some form of functionality which confirms if that's the case or not. Some possible examples:

  • bool :IsAService()
  • string :IsA() -> "Service"

Not sure what's the best method but feels like a decent addition.

@LPGhatguy
Copy link
Contributor

What are you looking to use this for? There isn't an API like this in Roblox itself, but maybe there should be if you have a great use case.

@railworks2
Copy link
Author

railworks2 commented Jun 25, 2021

Primarily I'm working using Remodel to port over a game to a fully managed Rojo workflow.

So searching through a file and converting it over to the file formats required to then rebuild for upload to Roblox. Standard stuff.

The main issue is just being sure that an instance is a service or not to create the relevant folders rather than it convert to a something unintentional.

While typically checking if X's parent is the data model and if the ClassName and Name is the same, covers most of them. It feels very hacky and could be broken by Roblox, see TeleportService and RunService.

There's no API for this in Roblox because I don't expect any devs to be searching through Roblox's file format to find it something is a service, it doesn't make sense on the platform.

Maybe if IsA identified as a service on Roblox would make sense.

I could see IsA being done for Remodel.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants