-
What do you want to achieve?
I want to use a custom font, specifically the “Silkscreen” font for a script that animates text (makes it shake or wiggle and stuff), so I use TextService:GetTextSize for it. but I get error -
What is the issue?
I get an error “Unable to cast Font to token” whenever I try to call GetTextSize() -
What solutions have you tried so far?
I tried getting help in different communities, I tried using values and attributes, even cloning a label with the font already on it, but nothing worked.
Problematic piece of code:
local text = "Hello world!"
local font = Font.new("rbxassetid://12187371840")
local fontSize = 30
local textSize = game.TextService:GetTextSize(text, fontSize, font, script.Parent.Frame.AbsoluteSize)
Any help would be appreciated, thank you!