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

Why won't the color of the text change its color when you click it?

I am trying to make it when you click a button, it changes the color of the text. I've tried many scripts and I am getting really upset and angry with it. There are no YouTube videos on how to help. Please tell me what I did wrong in this code!

script.Parent.MouseButton1Click:Connect(function(onClick)
	script.Parent.TextColor3 = Vector3.new(0,0,0)
	script.Parent.Parent.Redeem.TextColor3 = Vector3.new(0,0,0)
	script.Parent.Parent.TextBox.TextColor3 = Vector3.new(0,0,0)
	script.Parent.Parent.Font.TextColor3 = Vector3.new(0,0,0)
	script.Parent.Parent.Background.TextColor3 = Vector3.new(0,0,0)
	script.Parent.Parent.Stroke.TextColor3 = Vector3.new(0,0,0)
	script.Parent.Parent.SoonA.TextColor3 = Vector3.new(0,0,0)
	script.Parent.Parent.SoonB.TextColor3 = Vector3.new(0,0,0)
	script.Parent.MouseButton1Click:Connect(function(onSavage)
		script.Parent.TextColor3 = Vector3.new(255,0,0)
		script.Parent.Parent.Redeem.TextColor3 = Vector3.new(255,0,0)
		script.Parent.Parent.TextBox.TextColor3 = Vector3.new(255,0,0)
		script.Parent.Parent.Font.TextColor3 = Vector3.new(255,0,0)
		script.Parent.Parent.Background.TextColor3 = Vector3.new(255,0,0)
		script.Parent.Parent.Stroke.TextColor3 = Vector3.new(255,0,0)
		script.Parent.Parent.SoonA.TextColor3 = Vector3.new(255,0,0)
		script.Parent.Parent.SoonB.TextColor3 = Vector3.new(255,0,0)
		script.Parent.MouseButton1Click:Connect(function(onClix)
			script.Parent.TextColor3 = Vector3.new(255,0,0)
			script.Parent.Parent.Redeem.TextColor3 = Vector3.new(255,255,255)
			script.Parent.Parent.TextBox.TextColor3 = Vector3.new(255,255,255)
			script.Parent.Parent.Font.TextColor3 = Vector3.new(255,255,255)
			script.Parent.Parent.Background.TextColor3 = Vector3.new(255,255,255)
			script.Parent.Parent.Stroke.TextColor3 = Vector3.new(255,255,255)
			script.Parent.Parent.SoonA.TextColor3 = Vector3.new(255,255,255)
			script.Parent.Parent.SoonB.TextColor3 = Vector3.new(255,255,255)
		end)
	end)
end)

1 answer

✓ Accepted answer

You're using Vector3.new(), you want to use color3.new()

Additionally, color3.new() takes three arguements, 0 to 1, not 0 to 255. Replace all the 255's with 1's and you should be set.

4 comments

0

it didn't work :(

0

What's the error, and Color3.new, make sure it's capital

0

nevermint I found it :) thanks

0

You can also use Color3.fromRGB if you want to use 0 to 255.

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