To be more specific, I have this code:
if not db then
if human and hat then
db = true
Alarm.Noise:Play()
while x < 10 do
Alarm.BrickColor = BrickColor.new("Really red")
wait(0.5)
Alarm.BrickColor = BrickColor.new("White")
x = x+1
myVar.Text = ("HOW DARE YOU WEAR THAT WRETCHED HAT!?")
wait(3)
myVar.Text = ("YOU WILL BE SMITED BY MY WRATH!")
wait(3)
myVar.Text = ("DIE!!")
wait(2)
human.MaxHealth = 0
wait(3)
myVar.Text = (" ")
game.Workspace.Alarm.Noise:Stop()
end
db = false
This is part of what I have scripted so far. The problem is, that once the first change of color happens, it stops and continues on with the script. A quick run down: Detects if hat and human are true, changes db to true, then the brick changes red to white, then it stops flashing, and runs all the way through the rest of the code. So, what do I do, to make the changing/flashing color of the brick, work through out the block of code? All help is appreciated!
