It prints a number 1, I don’t know how and why it prints 1 and I believe none of my code does or manipulate this. This affect other prints, almost everytime I use print() at the end of the word it prints 1.
What solutions have you tried so far? I am confused.
I tried your initial method to see if it was a bug on your end and I was able to replicate the 1 printing. I’m guessing it has something to do with print logic.
Solution: I honestly couldn’t tell you why, but printing the gsubbed string as a variable seems to work. If anyone knows please let us know
local stringTest = [[
test {str}
]]
local newstring = string.gsub(stringTest, "{str}", game.Players.LocalPlayer.DisplayName)
print(newstring)
Look to the documentation of string.gsub() it returns string and number
if you do not want that 1 at the end consider using string.format(Str: string, …)
or use the method @PR_0B listed above