How would I convert an integer into a string

  1. What do you want to achieve? Keep it simple and clear!
    Getting better at scripting

  2. What is the issue? Include screenshots / videos if possible!
    I do not know how to convert an integer into a string

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I’ve looked in the DevForum, couldn’t find anything, and I couldn’t find an example of how to convert integers to strings on the API Reference

tostring(int)

​​​​​​​​​​​​​​​

2 Likes
local function convertToString(int) 
  return tostring(int)
end
1 Like

that’s just tostring.

print(convertToString(100) == tostring(100)) -->true

1 Like

That is literally useless, why would you make a new function that just calls one single other function with the same parameters

3 Likes

not to be mean but that is a waste of lines and time

It’s just to show how it can be used I guess

Thanks, I didn’t know it was that simple lol

but why would you do that???

I don’t know man, I’m braindead

Simple as this! You should use the thing called internet to make your research.
https://www.lua.org/pil/2.4.html

tostring()-- turns any thing in to a string not just numbers

example

print("stay"..tostring(true)) -- stay true
print("stay"..true) -- error cant concatcanate with bool

You probably could’ve found this out on the roblox developer hub-