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

Script not sending out messages in chat?

-->>: System messages

function makeSystemMessage(text, font, color)
	game.StarterGui:SetCore("ChatMakeSystemMessage", { -- Creates message
		Text = text;
		Font = font;
		Color = Color3.new(color)
	})
end

while wait(40) do
	makeSystemMessage("Having fun? Leaving a like on the game would be appreciated!", Enum.Font.Arial, "Cyan")
end

-- Sends a message when a player joins
game.Players.PlayerAdded:Connect(function(player)
	makeSystemMessage(player.Name.." has joined the game!", Enum.Font.Arial, "Deep Orange")
end)

-- Sends a message when a player leaves
game.Players.PlayerRemoving:Connect(function(player)
	makeSystemMessage(player.Name.." has left the game!", Enum.Font.Arial, "Deep Orange")
end)

This script is supposed to say things in chat when a player joins and leaves and such. But it doesn't work. This is a local script as well, I also tried it in a script and it didn't work-It told me to use a local script basically. The local script doesn't work though, whats wrong?

1 answer

I believe you need to use BrickColor for this and not Color3.new

game.StarterGui:SetCore("ChatMakeSystemMessage", { -- Creates message
        Text = text;
        Font = font;
        BrickColor = BrickColor.color 
    })

if you want to use color3.new then

makeSystemMessage("Having fun? Leaving a like on the game would be appreciated!", Enum.Font.Arial,(0.0156863, 0.686275, 0.92549)) --this is the color3 value for cyan
end

recommended to use brickcolor or Color3.fromRGB instead.

1 comment

0

Brick Color doesn't work, and when I try to put in an RGB value for Color3.fromRGB, the comma and parenthethesis get underlined red

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