Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do you tell if the player is typing?

Hello! I'm currently making a custom system UI and I'm attempting to make the custom chat button (as shown below) turn blue when I start typing.

The problem is that I don't know how to approach this. I've tried searching for the solutions but all I get are unhelpful answers to other problems.

Example #1

Is there an event that fires when the player starts/stops typing? I'm sorry I don't have code, I don't have any because I didn't know where to start.

1 answer

Ok, so this is the way to do it:

local typing = false
game:GetService(“UserInputService”).InputBegan:Connect(function(key, istyping)
      if istyping then
            typing = true 
     end
end)

Basically, the second argument of the function checks if the player is typing. Hope it helps!

2 comments

0

Also, you can use InputEnded to make typing false.

0

Yeah.

This discussion is preserved as it was. New answers, comments, and votes are closed.