RipullJoin Date: 2008-07-21 Post Count: 14249 |
This is just the section of the script that isn't working, it doesn't repeat so please don't add ends to it. The part turns red but it never turns back to the original color.
Color = script.Parent.BrickColor
if script.Parent.Parent.Health.Value <= 15 then
repeat script.Parent.BrickColor = BrickColor.new("Bright red")
Sound2:Play()
wait(.5)
script.Parent.BrickColor = Color until script.Parent.Parent.Health.Value == 0 |
|
RipullJoin Date: 2008-07-21 Post Count: 14249 |
Bump. |
|
|
You need an end for the if, and an until for the repeat. |
|
|
RipullJoin Date: 2008-07-21 Post Count: 14249 |
It's a section of the script, here is the entire:
Sound2 = Instance.new("Sound")
Sound2.SoundId = "http://www.roblox.com/asset/?id=15666462"
Sound2.Pitch = 1
Color = script.Parent.BrickColor
script.Parent.Parent.Health.Changed:connect(function (HealthCheck)
if script.Parent.Parent.Health.Value <= 15 then
repeat script.Parent.BrickColor = BrickColor.new("Bright red")
Sound2:Play()
wait(.5)
script.Parent.BrickColor = Color until script.Parent.Parent.Health.Value == 0
script.Parent.Mesh.Scale = Vector3.new(5.2, 6.2, 5.2)
wait(0.05)
script.Parent.Mesh.Scale = Vector3.new(4.2, 5.2, 4.2)
wait(0.05)
script.Parent.Mesh.Scale = Vector3.new(3.2, 5.2, 3.2)
wait(0.05)
script.Parent.Mesh.Scale = Vector3.new(2.2, 5.2, 2.2)
wait(0.05)
script.Parent.Mesh.Scale = Vector3.new(1.2, 5.2, 1.2)
wait(0.05)
script.Parent.Mesh.Scale = Vector3.new(0, 5.2, 0)
script.Parent.Parent:Remove()
wait(1)
end
end) |
|
|
RipullJoin Date: 2008-07-21 Post Count: 14249 |
Yep, it's in a part called Head and there is a seperate value called Health in another section of the model. |
|
|
Sound2 = Instance.new("Sound")
Sound2.SoundId = "http://www.roblox.com/asset/?id=15666462"
Sound2.Pitch = 1
Color = "Bright red"
script.Parent.Parent.Health.Changed:connect(function (HealthCheck)
if script.Parent.Parent.Health.Value <= 15 then
repeat
script.Parent.BrickColor = BrickColor.new("Bright red")
Sound2:Play()
wait(.5)
script.Parent.BrickColor = Color
until
script.Parent.Parent.Health.Value == 0
script.Parent.Mesh.Scale = Vector3.new(5.2, 6.2, 5.2)
wait(0.05)
script.Parent.Mesh.Scale = Vector3.new(4.2, 5.2, 4.2)
wait(0.05)
script.Parent.Mesh.Scale = Vector3.new(3.2, 5.2, 3.2)
wait(0.05)
script.Parent.Mesh.Scale = Vector3.new(2.2, 5.2, 2.2)
wait(0.05)
script.Parent.Mesh.Scale = Vector3.new(1.2, 5.2, 1.2)
wait(0.05)
script.Parent.Mesh.Scale = Vector3.new(0, 5.2, 0)
script.Parent.Parent:Remove()
wait(1)
end
end)
If it doesn't work let me know. Btw, you could even use a while true do loop with 0 wait [wait()] and some if statements...
That's easier, isn't it ? |
|
|
Oh I think it's wrong color, so please replace "Color" to the other color.
In case it's not working, I'm redoing it. |
|
|
Can you actually tell what this is supposed to do ? So I can rescript it :< |
|