It would make identifying if an object is a IntValue, Color3Value, CFrameValue, etc. easier if all of the value objects had 1 superclass. Then you would be able to do this:
for i, v in pairs(part:GetChildren()) do
if v:IsA("ValueObject") then
v:Destroy()
end
end
6 Likes
This has been posted before:
The downsides to creating a new object for each data type are that:
[ul]
[li]You have to create a new object every time you create a DataType (or should at least)[/li]
[li]Unable to use objects to store values for data types not represented with value objects (i.e. Vector2, UDim2, etc)[/li]
[li]Advanced Objects is spammed with lots of value objects since there are so many data types[/li]
[li]API bloat[/li]
[li]No way to check if something is a value object with :IsA(“ValueObject”) since al…
It’s not the main subject, but if you read through the thread EchoReaper suggests the same thing:
1 Like
Oh wow, exact same class name too lol
Autterfly
(Autterfly)
October 20, 2017, 12:01pm
#4
The solution .ClassName:match'Value'
always works but yes the base class would be an improvement.
1 Like