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

Chat service wont work, playerchatted isn't a functioning "Member" of player?

Asked by 4 years ago
-- Need help using chat service
local Hint = "/Hint"
game.Players.PlayerAdded:Connect(function(plr)
plr.PlayerChatted:Connect(function(msg)
if msg == Hint then
plr.PlayerGui.Hints.Enabled = true

1 answer

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

You put "PlayerChatted" instead of "Chatted"

local Hint = "/Hint"

game.Players.PlayerAdded:Connect(function(plr)
    plr.Chatted:Connect(function(msg)
        if msg == Hint then
            print("Player typed ".. Hint)
            plr.PlayerGui.Hints.Enabled = true
        else
            print("Player didn't type " .. Hint)
        end
    end)
end)
0
Thanks VitGamer! You are awsome TradingForDom 1 — 4y
0
No problem! Make sure to press Accept answer so we both get reputation. VitGamer123br 32 — 4y
0
You can update now! TradingForDom 1 — 4y
0
Hey vit, it wont work ;( TradingForDom 1 — 4y
View all comments (7 more)
0
Can you send the output error? VitGamer123br 32 — 4y
0
no output error TradingForDom 1 — 4y
0
can you send the code? VitGamer123br 32 — 4y
0
its the code you just put in TradingForDom 1 — 4y
0
check the code i sent you, you might want to check the output and edit it a little. Also make it a script if it isn't. VitGamer123br 32 — 4y
0
it was i made it module aswell TradingForDom 1 — 4y
0
I fixed it TradingForDom 1 — 4y
Ad

Answer this question