Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

can i convert peramaters to a string in roblox?

if this makes more sense

function example (anyparamater)
print (anyperamater)
--this line somehow converts anyperamater to a string--
end
example(hello)

what I want to know is how to make it print hello without the parameter being a string and the output should be the same with it being a string so the output in both ways should be saying hello

1 comment

0

What is your use case though

2 answers

✓ Accepted answer

Hi superspeedr1234!

I am not completely sure about this, but I think there is a function called tostring().

function example(anyparameter)
      print(anyparameter)
      local string = tostring(anyparameter)
end
example(hello)

Not sure if this works, but hope it does.

LennyPlayzYT

4 comments

0

k ill try

0

ill give you credit it dose print but its nil

0

Because anyparameter doesn't have a value

0

I think at least

This discussion is preserved as it was. New answers, comments, and votes are closed.