Clarify what value a variable contains (like parameters in functions)

What I mean with functions:

function boolean)
       -- This 'Parameter' is now recognized as a booleon

What I want to achive:
I want the same thing but for variables

local Number = 1 --Here I want to declare what the variable value type is

Is this possible in roblox or not? It’s something that most game engines I’ve used have

1 Like

local variable: datatype = value respective to datatype

local Number: number = 1

Remember that Lua is dynamically typed

Thanks! I tried putting the double colon behind the value!

Did you mean this?
local Number = 0:: number ?

Because that’s for the value not for the variable.

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