Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why isn't my brick chat script working when I click my desired object?

Asked by 5 years ago

Everytime I click on the object, it comes up with the error, "Unable to cast string to token"

local message = {"Required assistance!"}
local Interval = 3
local colour = "Pearl"

function onClickedMessage (mouse)
    for _, v in pairs(message) do
        game:GetService("Chat"):Chat(script.Parent, v, colour)
        wait(Interval)
    end
end

script.Parent.ClickDetector.MouseClick:connect(onClickedMessage)

Answer this question