Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

Why does this not work?

Asked by 10 years ago

I do not know why this does not work, is it because it has too many parents?

script.Parent.Parent.CurrentCriminal.Close.MouseButton1Click:connect(function() script.Parent.ImageLabel.BackgroundColor3 = Color3.new(255,0,0) end)

Help Please!

Thanks!

0
You gave us no information about how the explorer is setup, as that will change things. You told us that we should help you and you gave no information otherwise. FearMeIAmLag 1161 — 10y

1 answer

Log in to vote
0
Answered by
Perci1 4988 Trusted Moderation Voter Community Moderator
10 years ago

In the future, please put your code in a code block (that little blue Lua symbol)

Well there is no way for us to tell if you have too many parents or if any of your paths are incorrect, because we cannot see your explorer window. However, one of you problems is Color3.new(255,0,0). Color3 only takes a number between 0 and 1. Often people like to pick a number between 0 and 255 so they have an easier time reading it, and then divide that number by 255 which gives you a number between 0 and 1. However, you don't need to do this because you just have 255, 0, and 0 so you can change it to this:

Color3.new(1,0,0)

Dividing numbers by 255:

Color3.new(150 / 255, 50 / 255, 30 / 255) --Makes its a true Color3, between 0 and 1. 
Ad

Answer this question