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

Color3 glitch or error? [SOLVED]

[THIS QUESTION WAS SOLVED, THANKS FOR THE HELP!]

Why does this Color3 value output as black? I really don't get it..

function SendMessage(Text, TextColor)
	game.StarterGui:SetCore("ChatMakeSystemMessage", {
		Text = "[Server]: "..Text..""; 
		Color = Color3.new(TextColor); 
	})
end


SendMessage("Welcome to the game!", 0, 0.9, 0)

Any help is appreciated. Thanks!

2 answers

The correct way to write that function would be

function SendMessage(Text, TextColor)
    game.StarterGui:SetCore("ChatMakeSystemMessage", {
        Text = "[Server]: "..Text..""; 
        Color = TextColor; 
    })
end


SendMessage("Welcome to the game!", Color3.new(0, 0.9, 0))

You have 2 arguments for the function. The problem is, your last line is giving it 4. If you're going to use three values as an argument, you have to put them in parentheses.

Try this instead:

SendMessage("Welcome to the game!", Color3.new(0, 0.9, 0))

11 comments

0

Thanks dude, I forgot about that xD

0

Gives an error :(

0

Uhh, there is no such syntax tho. Either make it color3.new() or wrap it with {}

0

Alright, thanks for the help dude!

0

Okay, didn't see your edit yet

0

Still outputs it as black.

0

tried it, it's still black??

0

I can't get the message to show up at all. Is this inside a bigger script? If so, could I take the script and see if I could figure it out?

0

No.

0

It's not a bigger script. Are you using a localscript in StarterGUI?

0

try doing BrickColor.new(Color3.new())

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