Why isn't this working?..
01 | local function fun() --This is the disco part |
02 | while true do |
03 | script.Parent.Color = Color 3. new(math.random(), math.random(), math.random()) |
04 | wait( 0.5 ) |
05 | end |
06 |
07 | function onChatted(msg, recipient, speaker) --Function for msg |
08 |
09 | local source = string.lower(speaker.Name) |
10 | msg = string.lower(msg) |
11 |
12 | if (msg = = "disco" ) then --If noob101 says disco than disco is set to true |
13 | fun = true |
14 | end |
15 |
You need to do instead of
1 | fun = true |
you need to do
1 | fun() -- to start the function! |
Please accept the answer if correct and give reputation! We both get reputation!