While i now that i’m still a intermediate programmer going onto semi-professional, i guess this a good tutorial,
So, i’ve been searching on this tutorial for ages now, but i managed to improve it myself,
So this tutorial is about: How to make “Typing” in the new TextChatService, now this is something that nobody talks about as most of the games didn’t change because all scripts tend to lean to the Chat service more. But i created one for TextChatService, now this is Inaccurate because Roblox is still working on the scripts and somethings are still under development so i made this tutorial to help you!
Lets Get Started!,
First we get out typing billboardgui, Done? lets move on
we create a event in ReplicatedStorage and name it “Typing” or whatever you want, Done? lets go cmon!
we create 2 scripts, 1st is LocalScript in StarterPlayer → StarterPlayerScripts
2nd is ServerScript in ServerScriptService or Workspace, Done? lets move on!
in the Client Script:
local ChatBar = game:GetService("TextChatService").ChatInputBarConfiguration
while wait(0.3) do
if ChatBar.IsFocused then
game.ReplicatedStorage.Typing:FireServer(true)
else
game.ReplicatedStorage.Typing:FireServer(false)
end
end
Only this!
(Now this is the innaccurate Part as if you put ChatBar.Changed
, it won’t work as the IsFocused
property is locked and wait(0.3)
is the greatest checkrate i used)
and in the Server Script:
game.ReplicatedStorage.Typing.OnServerEvent:Connect(function(plr, Bool)
if Bool then
local clone = script.typingChat:Clone()
clone.Parent = plr.Character:WaitForChild("Head")
clone.Enabled = true
else
if plr.Character:WaitForChild("Head"):FindFirstChild("typingChat") then
local clone = plr.Character:WaitForChild("Head"):FindFirstChild("typingChat")
clone:Destroy()
end
end
plr.Chatted:Connect(function()
if plr.Character:WaitForChild("Head"):FindFirstChild("typingChat") then
local clone = plr.Character:WaitForChild("Head"):FindFirstChild("typingChat")
clone:Destroy()
end
end)
end)
and its only this!
(it is good if we keep the plr.Chatted
i think for more accuracy)
And it turns out as:
https://gyazo.com/9ddbb55fed6757b304527e1b09de7038
Not as smooth but its only thing i managed to get out of this,
if you think you can do better don’t hesitate improve the script and share it with us, i could learn something too! Thanks for looking at my thread