Hi, is there a way I can get what type a varible is compared to what it should be?
For an example,
local function Test(Param1: boolean, Param2: number)
print(typeof(Param1)) --> string - GivenType
print(typeof2(Param1)) --> boolean - Accepted/required type
print(typeof(Param1)) --> number - GivenType
print(typeof2(Param1)) --> number - Accepted/required type
end
Test("Hello", 123)
I doubt your game is so vulnerable that you need to verify types. At most, unexpected data would simply raise an error. If an error can take down some vital or protective system in your game, focus on making that system more robust