this probably isn’t phrased that well pls dont hurt me thanks
As a Roblox developer, it is impossible to for scripts to access FFlags.
This is a problem since I have the ability to change FFlags on the fly to develop this stuff in Studio (yes I know im basically playing with fire here).
The current workaround to this with many features is to prod what the flag should do and see if it returns an error which is a bit of a yucky implementation
local s, e = pcall(function()
return game:GetService("AvatarEditorService").GetInventory --this will error
end)
If this issue is addressed, it would improve my development experience because then I would be able to write code for features that are yet to be released, but can be accessed through an FFlag.
The main drive behind this is stuff like attributes, one of my entire projects was built ontop of an attribute-based object system, however I had no way to see if Roblox had actually enabled Attributes in live games, allowing me to fallback to a custom implementation.
Currently, I have to rely off this:
local AreAttributeEnabled = pcall(function()
script:SetAttribute("AttributesEnabled", true)
end)
if not AttributesEnabled then
--fallback to a custom implementation
end
There’s a few issues here, the main one being that we basically have to force an error to see if the feature is enabled which probably isn’t the best way of getting around this.
Now lets see what happens if we throw game:GetFastFlag
into the equation:
local AreAttributesEnabled = game:GetFastFlag("AttributesEnabled") --i cant remember it;s actual name
if not AreAttributesEnabled then
end
First of all, it’s less lines, and secondly, we’re not prodding for an error inside a pcall.
In summary, I want to write code for future features that aren’t out yet but I can activate within Studio.
ps: scripts can already access fast flags preceeded by User, I wonder why it was filtered to this behaviour.