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

Why dose KeyDown on / not work?

Asked by
RM0d 305 Moderation Voter
9 years ago

local Player = game.Players.LocalPlayer local Mouse = Player:GetMouse() Mouse.KeyDown:connect(function (key) if string.byte(key) == 47 then print("Chat Opened") script.Parent.TextBox:CaptureFocus() end end) script.Parent.TextBox.FocusLost:connect(function() if string.sub(script.Parent.TextBox.Text, 1,1) == "/" then print(Player.Name .. " Ran a command") workspace.ChatX.AdminByLua.Commands:FireServer(Message, Player) else x = script.Parent.TextBox.Text y = Player.Character.Name workspace.ChatX.Chat:FireServer(x,y) print(x,y) end end)

When i press / in studio test its works but when im online it dosnet work

1 answer

Log in to vote
0
Answered by
MrFlimsy 345 Moderation Voter
9 years ago

The '/' key is reserved for the built-in chat hotkey, and will not work in online mode, even if you remove the chatbar GUI.

0
Thanks... I will use the "C" key instead thanks for your time RM0d 305 — 9y
Ad

Answer this question