I need help with the elseif statement not checking (at all)
button.MouseButton1Click:Connect(function()
button.Visible = false
textBox.Visible = false
Txtbox2.Visible = false
local mol = math.random(0, 100)
local refm = math.random(0,100)
if mol >= percentage_sp or refm >= percentage_ref then
if Txtbox2.Text ~= "" then
MaximumCount = tonumber(Txtbox2.Text)
else
MaximumCount = 4
end
match(noob1, 0.5)
match(noob2, 1)
match(noob3, 2.5)
match(noob4, 1)
match(noob5, 0.5)
button.Visible = true
textBox.Visible = true
Count.Value = 0
Txtbox2.Visible = true
percentage_sp += 5
print(percentage_sp)
percentage_ref += 10
print(percentage_ref)
print(refm)
elseif mol <= percentage_sp then
print(5)
button.Visible = false
textBox.Visible = false
Txtbox2.Visible = false
spawn(function()MakeBubble("푸흡!!!",3) end)
match(e.slash1, 0.5)
spawn(function()MakeBubble("컼! 크헉!!!!", 5) end)
match(e.slash2, 3)
match(noob1, 0.5)
button.Visible = true
textBox.Visible = true
Txtbox2.Visible = false
Count.Value = 0
percentage_sp = 10
elseif refm <= percentage_ref then
print(1)
button.Visible = false
textBox.Visible = false
Txtbox2.Visible = false
script.Parent.Parent.refill.Visible = true
script.Parent.Parent.sfx_warning:Play()
script.Parent.Parent.refill.MouseButton1Click:Wait()
script.Parent.Parent.refill.Visible = false
button.Visible = true
textBox.Visible = true
Txtbox2.Visible = true
percentage_ref = 0
end
end)
The first ‘elseif’ statement is working, but the second elseif statement is not working at all.
I tried printing the variable and then it said
percentage_ref = 30
refm = 28