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

How exactly would I extract numbers from a textbox?

Hello, my name is Vincent! I have a question today. How exactly would I extract numbers from a textbox? First, let me give some information. So I have a textbox scripted to have only numbers, but I have another script that constantly puts the text "B$" in front of the said numbers, but it seems I can't extract only the numbers. How exactly would I do that?

1 comment

0

Disclaimer!!! I'm not asking for a script I'm asking how I would be able to do this.

2 answers

Use a StringValue and you can have it looped to check what is written

1 comment

0

I figured it out sorry but thanks for trying to help! :D

local textbox = "B$500"

local numbers = textbox:split("$")
print(numbers[2])

1 comment

0

I figured it out sorry but thanks for trying to help! :D

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