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

Good replacement for selected?

Asked by 10 years ago

I have it so if a player presses / and then types something in that text that they typed in would go in a text box. It's like the roblox chatting, except I want it to be custom. Can anybody point me in the right direction?

local player = game.Players.LocalPlayer
local mouse = player:GetMouse()

mouse.KeyUp:connect(function(key)
    if key:byte() == 47 then
        script.Parent.ChatBox.Selected = true --Selected doesn't work. What will?
    end
end)

1 answer

Log in to vote
1
Answered by 10 years ago

You need :CaptureFocus()

0
Thanks! CardboardRocks 215 — 10y
0
Haha we solved each other's problems :D CardboardRocks 215 — 10y
Ad

Answer this question