[ API Service ] v1.0.7a - A Utility ModuleScript for Roblox API Methods

Sometimes people create complex systems and algorithms that require Instances to have certain properties (such as object serialization). This module makes it easy for people to determine whether or not something has a specific property.

There’s a feature request thread filled with more use-cases.


The current work-around is something like this:

local function InstanceHasProperty(instance : Instance, property : string) : boolean
   return pcall(function()
      return instance[property]
   end)
end
1 Like