a = 10 b = 1 c = 5
If people voted and these were the results how would I figure out whats the highest?
This is a more complex way, but would be able to work with multiple numbers, or variables. Which could all be set into a table. I know you didn't ask for this exactly but this might help fix the problem or help in the future.
local a = 10 local b = 1 local c = 5 local Dictionary = {"a", "b", "c", "d", "e", "f", "g", "h", "I", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"} function Compare(Args) local HighestNumber = nil --The highestnumber out of the table local Letter = nil --The letter that goes with the highestnumber like A,B,C, etc. for I,v in pairs(Args) do --Grabs all of the variables from the table, and cycles until it's read through eah variable. if HighestNumber == nil then HighestNumber = v Letter = Dictionary[I] else if v > HighestNumber then HighestNumber = v Letter = Dictionary[I] end end end end Compare({a, b, c}) --{a,b,c} --A table, it stores the numbers from the variables a,b, and c.
a = 10 b = 1 c = 5 if a > b and a > c then print("a wins") else if b > a and b > c then print("b wins") else if c > a and c > b then print(" c wins") end wait() end wait() end