I want a text to appear by a chatbox. I DONT MEAN BY THIS
game.Chat:Chat()
Can you please help? Well, I don't know what to do so thats why theres no code.
I have a fix and I would appreciate it if you could also fix my problems(on my scripting helpers profile)
CLIENT SETUP
WITH CLIENT SETUP EVERY PLAYER WILL SEE A DIFFRENT MESSAGE
To do on client put this code in a local script in StarterPlayerScripts:
while true do local WaitTime = math.random(30,60) --wait time randomiser local Chat = { --Text to be used(list of possible chat msgs) "[System Message] Hello", "[System Message] Remember to like this game", "[System Message] Are you enjoying?" } local randommsgs = Chat[math.random(1, #Chat)] game.StarterGui:SetCore( "ChatMakeSystemMessage", { Text = randommsgs, Color = Color3.fromRGB( 255,0,0 ), --Coulor to be used Font = Enum.Font.Arial, --Font to be used FontSize = Enum.FontSize.Size24 } ) --Text size wait(WaitTime) --Waits the vale of w seconds between each message end
The correct syntax for using Chat() is as follows:
local Mouth = game:GetService("Chat") -- Lolz local Players = game:GetService("Players") local ind = 1 local Speaker = Instance.new("Part",workspace) Players.PlayerAdded:Connect(function(plr) while plr.Character == nil do print("Waiting"..string.rep(".",ind)) if(plr.Character ~= nil) then wait(1) break end wait() ind = ind+1 < 4 and ind +1 or 1 end Mouth:Chat(Speaker,"Hai!, "..plr.Name.."!!1!!") -- Say Hai! end)
The only way this will work is you need to have the chat box open, so it won't work in run mode only in play mode. Also, it will only appear as a chat bubble and NOT in the chat box, I'm not sure if it is possible to do that from client/server side scripts.