Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

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)

This discussion is preserved as it was. New answers, comments, and votes are closed.