Question
We all know the classes that represent values: BoolValue, IntValue, ObjectValue, etc…
I’m trying to create a simple debug menu that keeps track of all values in the game, but every time i need to check if the instance is a class of a value of any kind i need to do this:
if Instance:IsA("BoolValue") or Instance:IsA("IntValue") or Instance:IsA("ObjectValue") -- (...) then
--Do some debug stuff here
end
This bloats my code a lot and maybe even has performance issues.
I’ve already checked in the dev hub, however i didn’t found anything, so does a value abstract class even exist?
Solution
if Instance:IsA("ValueBase") then
--Do code to manipulate the value (Like showing it in a list?)
end