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

Why will this not work?

Why would this not work? Help please!

Thanks!

script.Parent.MouseButton1Click:connect(function() 
		script.Parent.ImageLabel.BackgroundColor3 = Color3.new(0,170,0)
			if script.Parent.Parent.OpenClose.MouseButton1Click() then
				script.Parent.ImageLabel.BackgroundColor3 = Color3.new(255,0,0)
		end
end)

1 answer

Color3 values goes from 0 to 1. If you want to convert real RGB to Color3, then you should have a function like this:

function Color(r, g, b)
     return Color3.new(r/255, g/255, b/255)
end

2 comments

0

That did not work, sorry.

0

What's the error?

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