i was coding something for my fighting game, and an if statement was working but it randomly broke for no reason whatsoever, its not that theres errors it just isnt firing
ive tried using elseifs, formatting the code, but nothing worked
if player.Character.Humanoid.Health < 75 and player.Character.Humanoid.Health > 50 then
explosionVFX.Size = explosionVFX.Size + Vector3.new(5,5,5)
print(explosionVFX.Size)
end
if player.Character.Humanoid.Health < 50 and player.Character.Humanoid.Health > 25 then
explosionVFX.Size = explosionVFX.Size + Vector3.new(10,10,10)
print(explosionVFX.Size)
end
if player.Character.Humanoid.Health < 25 and player.Character.Humanoid.Health > 0 then
explosionVFX.Size = explosionVFX.Size + Vector3.new(20,20,20)
print(explosionVFX.Size)
end
you could still implement this. check if the humanoid health changes, and then check if the humanoid health is greater or less than your number, and then change the hitbox size. Or you could put this into a while true do loop, idk.
i did try it, but it wouldnt work anyways because this is a script fired from a client script, so if i wanted it to work id have to be damaged and use the move at the same time which due to stuns isnt gonna happen, also it didnt work
originally it was elseifs, but i changed them in hopes it would work, it didnt, and none of them even run, i put print statements to make sure it works but it doesnt
the health changed event wouldnt work i just said this, the ability is fired by a tool meaning it isnt always running meaning id have to get damaged and use the move at the same time for it to work, and its not possible due to the stuns i made