I am making radio system for my game, and i ran into a problem, that i cannot find way to make ChatService:chat(radio, text, "White")
use textbox value as message.
I tried using "Message:"..text to make it work but what it did is make part say “Message:”. I also tried to search same issue, way to make it say value of textbox, and I found nothing.
textbox is gui in starter gui.
``
local ChatService = game:GetService(“Chat”)
local radio = workspace.Radio
local textbox = script.Parent.TextBox
local button = script.Parent.TextButton
local text = textbox.Text
local used = radio.Used.Value
local using = false
button.MouseButton1Down:Connect(function()
if (not using and not used) then
using = true
used = true
radio.Sound:Play()
script.Parent.Sound:Play()
ChatService:chat(radio, text, “Red”)
wait(1)
used = false
wait(2)
using = false
end
end)
``
Yeah, none. When i run the script with print(text) added in top of function, i get “message must non-empty” error on line that contains chat(), print also doesnt work