Using attributes to assign font

I’m working on a project which lets you change up proximity prompts using attributes, but i’ve been struggling with changing fonts. The methods i’ve tried (that i can remember)

local fontValue = script:GetAttribute("font")
objectText.Font = fontValue
objectText.Font = script:GetAttribute("font")
objectText.Font = Enum.Font(script:GetAttribute("font"))
objectText.Font = Font(script:GetAttribute("font"))

And so much more. I’ve asked roblox’s AI and they failed. The error message ive got states:

I hope some fo you know what to do in this scenario.
Thanks.

1 Like

Try objectText.FontFace. It’s takes a Font and always stays in sync with objectText.Font, which expects one of the pre-existing fonts enums (be it in form of an enum, a string, or a number).

5 Likes

oh my god bro, i feel so dumb now, ive been trying for legit months and you solved in a few minutes :sob: Anyway, thank you so much!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.