I don't see what I'm doing wrong. Please help!
local message = "A light in the Darkness"
local ErnestaLight = script.Parent
function onChatted(msg, recipent, speaker)
local sourse = string.lower(speaker.Name)
msg = string.lower(msg)
if (msg == message) then
for i = 1, 9 do
ErnestaLight.BrickColor.Name("Really red")
ErnestaLight.Material.Name("Neon")
end
end
end

6 comments
did this work? if so please accept answer
block.Material = "Neon" is wrong (or deprecated). This is the corrected version: block.Material = Enum.Material.Neon
I did test my version before posting it
Then it's deprecated. The better way is using Enum.
But still, it's a good answer.
Please explain why his code isn't working.