I think this is correct but its not working...
function onChatted(msg, recipient, speaker) --Function for msg
local source = string.lower(speaker.Name)
msg = string.lower(msg)
if (msg == "disco") then
script.Parent.Color = Color3.new(math.random(), math.random(), math.random())
wait(0.5)
end
end

2 comments
You don't have a connection line for your function.
As it is, this function will never run. Please look up the Chatted event on the wiki.