Hello again, thanks to a great suggestion on my recent issues, I'm now trying to configure everything to work with this method, at the moment I'm trying to use TextService
to get going, and one thing I'm trying to print for validation is TextService:GetTextSize()
, I believe I've formatted the required parameters correctly, if not please let me know. This is what I have
local VectorFillSize = ChatLabel.AbsoluteSize.X, ChatLabel.AbsoluteSize.Y local vector2 = TestService:GetTextSize(ChattedMessage, 5, "ArialBold", VectorFillSize) print(vector2)
Console replies
Unable to cast double to Vector2
Please help me out!
You need to create a Vector2
value from your ChatLabel's AbsoluteSize
.
local VectorFillSize = Vector2.new(ChatLabel.AbsoluteSize.X,ChatLabel.AbsoluteSize.Y) local ReturnSize = TestService:GetTextSize(ChattedMessage, 5, "ArialBold", VectorFillSize) print(ReturnSize) --i wouldnt name your variable vector2, as it may cause confusion between the actual Vector2 variable. just remember that :GetTextSize() returns a Vector2, so thats what ReturnSize is
See how the frameSize
argument is a Vector2
value on this page.