Hello, in this post I would like to know how I can compare two tools, if the name of a tool is the same or if it is different, or if it is that tool.Name that I am looking for.
Example of this:
if tool.Name == "toolName" and tool.Name2 == "toolName2" then end
if tool.Name ~= "toolName" then end
You could just simply check if tool.Name ~= tool2.Name, adding just another elseif statement if the original if statement didn’t return true
local tool = -- add here tool1
local tool2 = -- add here tool2
if tool.Name == tool2.Name then
print("same")
-- do stuff here
elseif tool.Name ~= tool2.Name then
print("different")
-- do more and more stuff here
end
Of course, if you’d want to compare a tool with other tools you could reference it inside a table