I need to insert a string in the middle of another string, and I'm not sure how I should go about this. I have a line of code that errors whenever I try to run the script.
local text = ("Pick "..version.."?")
"version" is a string variable. I don't know why this errors, but I would appreciate some help. Thanks!
Hmm, try doing it this way;
local version = "1.20.0" --Heres our string local text = ("Pick "..version.."?") --Heres what it is going to be used in
If this isn't enough, or I didn't do it like you asked, just let me know and I'll fix it. Hope this helped!
Ok, lets try doing it this way;
local version = "1.20.0" --We have our string, now lets put it to use local text = ("Pick "..version.."?") --Now, I'll persume your using this for a 'Message', so lets do this local Message = Instance.new("Message", game.Workspace) --I just put the Parent as workspace, you can change it if you want to --Makes a new Message and sets its Parent to Workspace Message.Text = text --The Message is now displaying what the string is 'text is the string being used'
Hope this helped!