Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to ignore part of a value?

Asked by 4 years ago

I'm trying to create a variable that ignores the "$" in the text of a label and I don't know how, any ideas?

local item = script.Parent.Parent.Title.Text -- "$10"
local itemName = -- I want this to = 10

1 answer

Log in to vote
0
Answered by 4 years ago

Just get everything after the first character

local itemName = item:sub(2)
Ad

Answer this question