The script runs fine it runs the “weak 1” which is “L” meaning if it’s L it should run on to the next statement which will become “L-L” but it is not running to the next statement when the value is L
How can I fix?
local Moves = {}
local Combat = require(script.Combat)
Moves["Combat"] = function(player, Character,neededkey)
local plr = game.Players:GetPlayerFromCharacter(Character)
local CombatChain = Character.CombatChain.Strings
local gui = plr.PlayerGui.HealthGUI.Combo
if neededkey == "L" then
CombatChain.Value = neededkey
Combat["Weak 1"](player, Character, Character.Humanoid)
gui.Text = CombatChain.Value
print(CombatChain.Value)
elseif CombatChain.Value == "L" then
CombatChain.Value = CombatChain.Value.."-"..neededkey
print("Combat2")
Combat["Weak 2"](player, Character, Character.Humanoid)
gui.Text = CombatChain.Value
elseif CombatChain.Value == "L-L" then
Character = player.Character
CombatChain.Value = CombatChain.Value.."-"..neededkey
Combat["Weak 3"](player, Character, Character.Humanoid)
gui.Text = CombatChain.Value
elseif CombatChain.Value == "L-L-L" then
Character = player.Character
CombatChain.Value = CombatChain.Value.."-"..neededkey
Combat["Weak 4"](player, Character, Character.Humanoid)
gui.Text = CombatChain.Value
elseif CombatChain.Value == "L-L-L-L" then
Character = player.Character
CombatChain.Value = CombatChain.Value.."-"..neededkey
Combat["Weak 5"](player, Character, Character.Humanoid)
gui.Text = CombatChain.Value
end
end
return Moves