So I made this script where it loops so it takes away health and if the Break value is too true then it breaks the code. But it doesnt work. I even checked and the break value goes true correctly but the repeat doesnt break:
repeat
wait(0.1)
humanoid:TakeDamage(2)
until player2.PlayerGui.Struggle.Break.Value == true or humanoid.Health <= 2 or script.Parent.Parent.Transformed.Hit.Value == true or humanoid.Parent.Transformed.Value ~= Color3.new(0,0,0) or script.parent.parent.Humanoid.Health <= 0
So theres this gui where if you click space it lowers a int value by 1 so when the intvalue reaches 0 it sets the break value to true. I still havent made it so the break value goes back to normal. So no Its not changing mid script
Try printing out all of your conditional checks, and see if at least one of them is true or not?
repeat
wait(.1)
humanoid:TakeDamage(2)
local Check1 = player2.PlayerGui.Struggle.Break.Value == true
local Check2 = humanoid.Health <= 2
local Check3 = script.Parent.Parent.Transformed.Hit.Value == true
local Check4 = humanoid.Parent.Transformed.Value ~= Color3.new(0,0,0)
local Check5 = script.Parent.Parent.Humanoid.Health <= 0
print(Check1, Check2, Check3, Check4, Check5)
until Check1 or Check2 or Check3 or Check4 or Check5