Changing brick color in loop

So I was trying to make an extremely basic flashing part script for my game, and when I tried running it in studio the part just turned neon-white then just didn’t do anything. Is this an issue with studio or is there something wrong with my code that I’m just not seeing? Script was in ServerScriptService

local flash = game.Workspace.flash

flash.Material = "Neon"

while true do:
	flash.BrickColor = BrickColor.new("White")
	wait(0.2)
	flash.BrickColor = BrickColor.new("Really black")
end

You don’t yield after the second setting, so it almost instantly sets back to the first again. Add another wait before the end of the loop.

Also you don’t need a colon after the do.

1 Like

Thank you, I added another ‘wait’ and now it works