Warning when using the NumberValue object itself instead of its Value

Hello
Is there a way to have some kind of warning in Studio when I use in an expression the instance of the object instead of its value attribute?
For example :

local k:NumberValue = Instance.new("NumberValue")
if k>5 then
	print("bigger") 
end

Thanks

1 Like

There should be a warning both in --!strict and (explicity declared) --!nonstrict mode.

1 Like

You can use the --!strict flag at the top of your script.

This enables strict type checking mode which also adds some other stuff, see here

1 Like

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