Hello there, In the process of creating a minigame script I have ran into a slight issue, Im trying to check if A doesn’t equal to B.
Here is my script:
local Titles = {"South-Korea","North-Korea","UnitedKingdom","UnitedStates"}
local GetTag = math.random(1,#Titles)
local PickTag = Titles[GetTag]
local GetTag2 = math.random(1,#Titles)
local PickTag2 = Titles[GetTag2]
-- Make sure tags aren't the same
if PickTag2 == PickTag then
print("Chosen the same for each randoms. Redoing.")
Status.Value = "Cannot continue SwordFight due to Game choosing "..PickTag2 .. " VS "..PickTag
repeat
wait(1)
GetTag2 = math.random(1,#Titles)
PickTag2 = Titles[GetTag2]
until not PickTag == PickTag2 -- Here I want it so PickTag doesn't equal to PickTag2
print("Selected a different tag!")
end
I don’t know if there is a way to do this or not, therefore Im asking the forum, Any help is appreciated!