Either one works Thanks!
EDIT: Is it possible to put quotes around a concatenation? like the first example, but if the “test” variable couldn’t have quotes. Like if I wanted to append player:GetName to text.txt so it shows up like “playername” in the file.
EDIT2: Nevermind, I figured it out!
local test = test
cmd.exec("echo ' \""..test.."\" ' >> test.txt")
EDIT3: Erm, I’m getting “Unterminated String” when trying to run this…
EDIT4: Okay, last edits. I’m an idiot. I forgot that second ’ to close off the string.