local tool if not tool then print"e" else print"c" end
it won't print "c" whatever I change 'tool' to, any help appreciated
I assume you're trying to assign a variable named tool to whatever value the ternary statement evaluates to? If this was the exact code you used, then you missed an equal '=' operator during the assignment.
local tool = if not tool then print("e") else print("c")
Keep in mind, however, that this only works if the tool is nil or false. Also, the variable named tool will be reassigned to whatever print() returns.