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

[SOLVED] This color script wont work ImageColor3 for a GUI..?

Im using a local script, should I be? Trying to change the image colour on click... it should be working?

script.Parent.MouseButton1Click:Connect(function()
	script.Parent.Parent.Parent.ImageColor3 = ("41, 255, 137")
end)

2 answers

✓ Accepted answer

Firstly, ImageColor3 doesn't accept the way you put the values ("41, 255, 137"), it accepts a type of value called Color3.

You don't use strings to express Color3 values, you use numbers instead:

script.Parent.MouseButton1Click:Connect(function()
	script.Parent.Parent.Visible = false
	script.Parent.Parent.Parent.ImageColor3 = Color3.new(41, 255, 137)
end)

Here's a bit more of information about your question: https://developer.roblox.com/en-us/api-reference/property/ImageLabel/ImageColor3

And yes, you use local scripts to show stuff that a single player should see, such as guis. Hope i helped, and if i did, please click the accept answer button.

(sorry if i was unclear, i'm terrible at explaining stuff)

2 comments

0

Thanks.

0

No problem.

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