Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How activate textboxes without clicking on them? (Sloved! :)

Asked by 6 years ago
Edited 6 years ago

Hi i tried to make a custom chat and i don't know any way to active a textbox without clicking on them

Here is what i tried

uis.InputBegan:Connect(function(input)
    if input.KeyCode == Enum.KeyCode.Z or input.KeyCode == Enum.KeyCode.Y then -- Made that because i'm a austria german and have a qwertz keyboard
        chatgui.TextBox.Active = not chatgui.TextBox.Active

    end
end)

That didn't work so could anyone help me?

1 answer

Log in to vote
0
Answered by
Vezious 310 Moderation Voter
6 years ago
Edited 6 years ago

Use CaptureFocus.

http://wiki.roblox.com/index.php?title=API:Class/TextBox/CaptureFocus

chatgui.TextBox:CaptureFocus()
0
Thanks! :) stommmDev 7 — 6y
0
No problem, if this solved your problem, can you accept this as a solution? Vezious 310 — 6y
0
Idk how to do this i'm new to this website ;-; stommmDev 7 — 6y
Ad

Answer this question