Can somebody help me with this simple script

Hey so i’m not a scripter but I don’t know why this script doesn’t work can anybody help?

SCRIPT:

script.Parent.MouseButton1Click:Connect(function()
script.Parent.Text = “Off”
wait(0.1)
script.Parent.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
end)

Feel free to ask anything you want. :slight_smile:

Thanks!

2 Likes

Explain more in detail the problem with the script.

Is this a screenGUI, or a billboard/surface GUI?

When I click it it says off but it doesn’t go red.

A text button (so surface GUI I guess)

Wait no Screen GUI (30 chars…)

Use Color3.new(red/255,green/255,blue/255) color3.fromrgb doesn’t really work well for me. (try to fit all comments in one post btw)

1 Like

Alright. Thanks for the feedback and help I will try that.

hmm i tried this out in studio, seems to working fine :thinking:

I mean, the only other thing could be if the background is invisible, which is probably isn’t if you are trying to change it, but I’ll just ask to be sure.

Maybe it’s my other scripts in it?

Wait. Could it be because I roundified it and it should be imagecolor3?

are you using a local script? Where did you keep it?

Did you use the correct type of script? (ModuleScript, LocalScript, Script)

Yep, there it is. 30 charsssssssss

I am using a script (30chars…)

I am using roundify so maybe it should be ImageColor3? Or something.

use a local scipt and see if it works

If the textbuttons BackgroundTransparency is 1 or higher that would mean it is turning red but since the transparency is 1 or higher you can’t see it

Yeah, if it’s roundified you have to change imagecolor3. The background color doesn’t matter to it