As a Roblox developer, it is currently too hard to create a sharable value for Vector2’s. You end up using a Vector3Value!
This has big issues when trying to transfer a vector that only has 2 issues, as Vector3’s cannot be muliplied with Vector2’s, and so storing any x/y value like absolute size in a Vector3Value requires more data being moved around, decreasing performance.
If Roblox is able to address this issue, it would improve my development experience because I could use Vector2 values in my code!
Some further explanation of use cases to support this request.
Some developers use ValueBases (e.g. NumberValue) to represent data belonging to Instances. Among a number of other reasons, this is convenient because:
Replication from the server is simple (just change the value - no need to fire and listen for remotes)
Replication uses coalescing behavior (only the latest property value is sent when replication occurs, not any intermediate values).
The lack of Vector2Value object means that developers wishing to attach Vector2 data belonging to an object must either:
Use a different (and more complicated) system of replication; or
Use a Vector3Value, which is not only wasteful (see above), but also inconvenient because the developer has to write code on either end to convert back and forth between data types.
Might as well include all the other missing types:
Axes
ColorSequence
Faces
NumberRange
NumberSequence
PhysicalProperties
Rect
Region3
Region3int16
UDim
UDim2
Vector2int16
Vector3int16
Also worth mentioning that ValueBases have utility with TweenService for tweening values generally, so it would be nice to at least have all the tweenable types covered.
I just ran into this today with a city builder grid placing system where I identify coordinate placement on a planar grid using Vector2. Converting to and from Vector3 is a bit annoying and makes it less readable for someone else to come along and understand what’s going on.
Attributes probably would satisfy my use case though, so long as they are replicated from server to client, so hopefully those arrive sooner rather than later.
Is there somewhere where we can go and see all the specification about Attributes, like the Tween question in earlier replies, and the replication question in mine?