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

How Can I Change String Value When Chatted?

Asked by 9 years ago

Hello I don't know what is wrong with me I script for 6 years and now I am stuck on here. I want to change StringValue.Value with message that I chatted. I tried this:

game.Players.PlayerAdded:connect(function(player)
    player.Chatted:connect(function(msg)
        if player.Name == "vincius0000" then
            if script.Parent.Status.Value == true then
                script.Parent.Word.Value = msg
            end
        end
    end)
end)

And doesn't work.

1
This looks fine, assuming your paths are correct. It would be more efficient to check the player's name before connecting the Chatted event, though. Perci1 4988 — 9y
0
Something is wrong with first line because when i added print("1") between lines 1 and 2 it didint say 1 in output. vincius0000 0 — 9y

Answer this question