Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to add a symbol in front of a value in a text label?

This is the important part of the code

script.Parent.Text = plr.PlayerStats.MeleeExp.Value / plr.PlayerStats.MaxMeleeExp.Value * 100

I want to add a % symbol after this value

1 comment

0

in the end do this * 100.."%" .. means followed by and since % is not a value u need the speechmarks

1 answer

✓ Accepted answer
script.Parent.Text =  tostring(plr.PlayerStats.MeleeExp.Value / plr.PlayerStats.MaxMeleeExp.Value * 100).."%"

You can use "tostring" to transform a value into text. Then, use ".." to add the percentage character.

1 comment

0

Thanks a lot good sir!

This discussion is preserved as it was. New answers, comments, and votes are closed.