How can I get a specific value with return?

Hello,

This is probably a very easy thing to solve

I was wondering how to get a specific value when returning a value

function mod.DoSomething()
local Value = 1038
local String = "Hello Guys, Welcome to my LetsPlay of.."

return Value, String -- returns 2 Values, how do i get a specific one?
end)

Oh simple, since function returns two values, you can declare a value & string with two variables.

local Value, String = mod.DoSomething()
1 Like

Huh, I didn’t know that, thanks!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.