I am just wondering which statement is more efficient and recommended to use. I don't care about the code, I just want to know for future reference which way is better.
1:
if game.Players[spawnNPC.Data.Owner.Value].Days.Value < 3 then
foodToChoose = tier_1_tab
end
if game.Players[spawnNPC.Data.Owner.Value].Days.Value < 5 then
foodToChoose = tier_2_tab
end
2:
if game.Players[spawnNPC.Data.Owner.Value].Days.Value < 3 then
foodToChoose = tier_1_tab
elseif game.Players[spawnNPC.Data.Owner.Value].Days.Value < 5 then
foodToChoose = tier_2_tab
end

1 comment
Also if you want the 5 to be included, put <=. How your statement is right now it's 6 or higher. Unless thats how you want it.