Im trying to make a number animation and for that I need the start number of the animation which is in the text label.
print(textLabel.Text) -- prints "$54"
I want to tonumber() the 54 only problem is that for that I need to remove the $ sign. But idk how, because the gsub keeps giving errors for using $ signs. Like: PlayerGui.BiddingGui.BiddingLocal:10: invalid argument #2 to ‘tonumber’ (base out of range).
These are the lines I tried:
local startPrice = tonumber(string.gsub(priceText.Text, "%$", ""))
And:
local startPrice = tonumber(string.gsub(priceText.Text, "$", "")) -- removing the % sign