of     1   

Lurrrch
#36321314Sunday, October 31, 2010 11:41 PM GMT

This script runs perfectly how I want it to, untill it hits the last line and finishes. Then, all of test just suddenly freezes and I have to use Task Manager to get it off... What's making it break at the end? while true do wait() if script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 99 then script.Parent.Size = UDim2.new(0, 113, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 98 then script.Parent.Size = UDim2.new(0, 111, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 97 then script.Parent.Size = UDim2.new(0, 109, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 96 then script.Parent.Size = UDim2.new(0, 107, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 95 then script.Parent.Size = UDim2.new(0, 105, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 94 then script.Parent.Size = UDim2.new(0, 103, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 93 then script.Parent.Size = UDim2.new(0, 101, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 92 then script.Parent.Size = UDim2.new(0, 99, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 91 then script.Parent.Size = UDim2.new(0, 97, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 90 then script.Parent.Size = UDim2.new(0, 95, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 89 then script.Parent.Size = UDim2.new(0, 93, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 88 then script.Parent.Size = UDim2.new(0, 91, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 87 then script.Parent.Size = UDim2.new(0, 89, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 86 then script.Parent.Size = UDim2.new(0, 87, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 85 then script.Parent.Size = UDim2.new(0, 85, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 84 then script.Parent.Size = UDim2.new(0, 83, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 83 then script.Parent.Size = UDim2.new(0, 81, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 82 then script.Parent.Size = UDim2.new(0, 79, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 81 then script.Parent.Size = UDim2.new(0, 77, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 80 then script.Parent.Size = UDim2.new(0, 75, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 79 then script.Parent.Size = UDim2.new(0, 73, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 78 then script.Parent.Size = UDim2.new(0, 71, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 77 then script.Parent.Size = UDim2.new(0, 69, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 76 then script.Parent.Size = UDim2.new(0, 67, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 75 then script.Parent.Size = UDim2.new(0, 65, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 74 then script.Parent.Size = UDim2.new(0, 63, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 73 then script.Parent.Size = UDim2.new(0, 61, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 72 then script.Parent.Size = UDim2.new(0, 59, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 71 then script.Parent.Size = UDim2.new(0, 57, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 70 then script.Parent.Size = UDim2.new(0, 55, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 69 then script.Parent.Size = UDim2.new(0, 53, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 68 then script.Parent.Size = UDim2.new(0, 51, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 67 then script.Parent.Size = UDim2.new(0, 49, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 66 then script.Parent.Size = UDim2.new(0, 47, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 65 then script.Parent.Size = UDim2.new(0, 45, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 64 then script.Parent.Size = UDim2.new(0, 43, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 63 then script.Parent.Size = UDim2.new(0, 41, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 62 then script.Parent.Size = UDim2.new(0, 39, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 61 then script.Parent.Size = UDim2.new(0, 37, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 60 then script.Parent.Size = UDim2.new(0, 35, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 59 then script.Parent.Size = UDim2.new(0, 33, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 58 then script.Parent.Size = UDim2.new(0, 31, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 57 then script.Parent.Size = UDim2.new(0, 29, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 56 then script.Parent.Size = UDim2.new(0, 27, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 55 then script.Parent.Size = UDim2.new(0, 25, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 54 then script.Parent.Size = UDim2.new(0, 21, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 53 then script.Parent.Size = UDim2.new(0, 16, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 52 then script.Parent.Size = UDim2.new(0, 11, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 51 then script.Parent.Size = UDim2.new(0, 6, 0, 13) elseif script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 50 then script.Parent.Size = UDim2.new(0, 0, 0, 13) wait(1) end end
Lurrrch
#36321403Sunday, October 31, 2010 11:43 PM GMT

No error is displayed, since the entire thing freezes, so I wouldn't be able to see it if it did...
Lurrrch
#36321474Sunday, October 31, 2010 11:44 PM GMT

Halp
Lurrrch
#36321529Sunday, October 31, 2010 11:46 PM GMT

Anyone?
Lurrrch
#36321680Sunday, October 31, 2010 11:49 PM GMT

Seriously... You don't even have to read all of it, just the end... HALP
Lurrrch
#36321844Sunday, October 31, 2010 11:52 PM GMT

ARRGH
crazypotato4
#36321866Sunday, October 31, 2010 11:52 PM GMT

delete the wait(1)? :D
Scriptzz
#36321897Sunday, October 31, 2010 11:53 PM GMT

Im guessing it's lag, created by that happening almost instantly. I suggest adding some more waits...
Lurrrch
#36321956Sunday, October 31, 2010 11:54 PM GMT

@crazy Very funny... @Scriptzz Considering it's using ifelse values, and that it works perfectly to the very end, I don't think waits would have any effect... Any other suggestions?
crazypotato4
#36322022Sunday, October 31, 2010 11:56 PM GMT

Why is mine very funny? It was actually a serious suggestion. :D
pokelover980
#36322235Sunday, October 31, 2010 11:59 PM GMT

Not enough ends, I believe. You'll need enough ends to compensate for each elseif (unless elseif's don't need ends, but I'm fairly sure they do).
crazypotato4
#36322261Sunday, October 31, 2010 11:59 PM GMT

elseifs do not require ends.
pokelover980
#36322329Monday, November 01, 2010 12:01 AM GMT

Odd, I thought they did, and it'd only make sense that they did. I don't ever use elseif's, though, because if I need to use that many if statements there's likely a better solution :/
kension19
#36322525Monday, November 01, 2010 12:04 AM GMT

MSizeX = 13 MSizeY = 113 --=============-- character = nil function x(y) if character ~= nil then Humanoid = character.Humanoid script.Parent.Size = UDim2.new(0,(MSizeX),0,(MSizeY * (Humanoid.Health / Humanoid.MaxHealth))) end end while character == nil do wait(0.2) local blah = script.Parent.Parent.Parent.Parent.Parent.Character if blah ~= "" then character = blah character.Humanoid.HealthChanged:connect(x) break end end
teseting
#36323294Monday, November 01, 2010 12:17 AM GMT

c = script.Parent.Parent.Parent.Parent.Parent.Character while true do wait() if c then break end end while true do wait() script.Parent.Size = UDim2.new(0, c.Humanoid.Health - 100*2, 0, 13) end
Lurrrch
#36360303Monday, November 01, 2010 10:15 PM GMT

@ 2 people above Those do not work for the required functions I am using
Lurrrch
#36360980Monday, November 01, 2010 10:23 PM GMT

Gawd this is annoying...
Lurrrch
#36361136Monday, November 01, 2010 10:26 PM GMT

WHY IS THIS FREEZING
Lurrrch
#36362533Monday, November 01, 2010 10:45 PM GMT

Woot fixed it.

    of     1