Here is the problem. I’m trying to change a string like this Side[number]
to just the number after it. Like this:
string.gsub("Side1", "Side", "")
The output
1 1
Why is this? Is there a way to fix it?
Here is the problem. I’m trying to change a string like this Side[number]
to just the number after it. Like this:
string.gsub("Side1", "Side", "")
The output
1 1
Why is this? Is there a way to fix it?
string.gsub
returns two value. The first being the result while the second being the number of substitute.
Put a parenthesis around it if you only want the first value.
Around what exactly? _________
The function call. For example (string.gsub("Side1", "Side", ""))
.