Hey trying to fix a bug with there chat stacking off to the side as shown here:
I have tried, waiting between each message in case it’s a issue with chatting to fast but can’t seem to find a solution.
Hey trying to fix a bug with there chat stacking off to the side as shown here:
I have tried, waiting between each message in case it’s a issue with chatting to fast but can’t seem to find a solution.
I’m confused. What scripting issue are you trying to solve here?
As far as I know this is just a Roblox chat issue in general as I have seen in various games.
Sorry! I could not think of another place to put it, but the function I use to make the messages is
function Chat(msg)
wait()
game:GetService("Chat"):Chat(script.Parent.Head, msg, Enum.ChatColor.White)
end
Ah I see, thanks for clarifying. One solution you might try is adding a delayed cooldown. Here’s what I mean:
local chatting = false --bool to check if they are currently chatting
local cooldown = (numberhere) --make it however long it takes for chat bubbles to dissipate
function Chat(msg)
wait()
if chatting == false then --check if they are already chatting
chatting = true
game:GetService("Chat"):Chat(script.Parent.Head, msg, Enum.ChatColor.White)
wait(cooldown) --wait until chat bubble dissipates
chatting = false
elseif chatting == true then --if they are chatting, wait until they are not and then process our original chat request
repeat wait() until chatting == false
chatting = true
game:GetService("Chat"):Chat(script.Parent.Head, msg, Enum.ChatColor.White)
wait(cooldown)
chatting = false
end
end
so essentially we are just taking any overlapping chat requests and processing them once the queue is clear.
Thanks! let me test it out
Just add a debounce/cooldown like @nrd1229 said.
local Debounce = true function Chat(msg) if Debounce == true then Debounce = false game:GetService("Chat"):Chat(script.Parent.Head, msg, Enum.ChatColor.White) wait(0.5) Debounce = true end end
This a great solution as well, but it would require him to implement the same cooldown into the wholefood ordering interface(at least thats what I think it is).