Whats wrong with this? I've re-written this 4 times and it still doesn't work.. Can somebody help?
local group = {
["WildLasVegas"] = true;
["Senias"] = true;
}
game.Players.PlayerAdded:connect(function(player)
if group[player.Name] then
player.Chatted:connect(function(msg)
if (msg == "disco") then
script.Parent.Color = Color3.new(math.random(), math.random(), math.random())
wait(0.5)
end
end)
end
end)

5 comments
What are you trying to change the color of?
Yes, what's script.Parent?
My recommendation for this is to have 2 separate scripts (not including this one). A DiscoOn and DiscoOff, each being while loops to, well, the name is self explanatory. They are enabled/disabled by this script
No reason to split it into multiple scripts. You need a while loop, combined with a simple
ifin conjunction with this event.@BlueTaslem could you fix it please?