The issue is whenever I run this the tries doesn't go down... no errors whatsoever.
function c()
local ctc= math.random(1,3)
local try = script.Parent.Parent.Tries.Value
if try > 0 then
if ctc == 1 then
try = try - 1
script.Value.Value ="test1"
elseif
ctc == 2 then
try = try - 1
script.Value.Value = "test2"
elseif
ctc== 3 then
try = try - 1
script.Value.Value = "test3"
end
elseif try <= 0 then
try = 0
script.Parent.TextButton.Text = "No tries left!"
end
end
script.Parent.TextButton.MouseButton1Click:connect(function()
c()
script.Parent.TextLabel.Text = script.Value.Value
end)
