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

Making a chat-oriented scoreboard, but the script won't work?

Asked by 4 years ago
game:GetService("Players").PlayerAdded:connect(function(Player)
    Player.Chatted:connect(function(Message)
        if Player.Team.Refs then
            if Message == "1" then
                game:GetService("StarterGui").made.TextLabel.Text = 1
            end
        end
    end)
end)

Can somebody help? Roblox Studio doesn't see any errors either. This is currently in the ServerScriptService.

1 answer

Log in to vote
0
Answered by 4 years ago

You need to input a string, simply put quotes on the 1 or any other number.

game:GetService("Players").PlayerAdded:connect(function(Player)
    Player.Chatted:connect(function(Message)
        if Player.Team.Refs then
            if Message == "1" then
                game:GetService("StarterGui").made.TextLabel.Text = "1"
            end
        end
    end)
end)

Ad

Answer this question