How to grab a Text Labels Font "name/type" within a script

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? I want to reference the Font Face name so I can set it as the value for a SringValue. This would be without manually typing out the font name for each stat created.

  2. What is the issue? I cant find a way to grab a labels font style and paste it as the stat value.

  3. **What solutions have you tried so far?**Web search and variations to script.

		local TitleStat = Instance.new("StringValue")
		TitleStat.Name = script.Parent.Name
		TitleStat.Value = script.Parent.FontFace -- Trying to get name for this line
		TitleStat.Parent = Player:WaitForChild("PlayerAssets"):WaitForChild("Titles")

I’m unsure if this is possible, any help with solution work around would be appreciated!

FontFace is an Enum, so you can just do:

script.Parent.FontFace.Name --returns the name of the enum

Had already tried that. Give this error 'Name' is not a valid member of Font

Sorry for the mistake. Maybe you could try

script.Parent.Font.Name

Yes that worked, Thank you! I’m a rookie

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