Help with an accent colour handler

Hi there, I need some help with an accent colour handler that I’m using in my plugin.

It currently doesn’t work, the Colour is in a stringvalue because I don’t know what other value that I can use but it means that this is happening (the textbox is the only thing that has the accent colour handler in it so far)

image

The script for the accent colour handler is this:

-- Accent Colour Handler

local par = script.Parent

par.BackgroundColor3 = Color3.fromRGB(par.Parent.Parent.Parent.AccentColour.Value)

Please let me know if I need to send more information

1 Like

I completely didn’t realise that Color3Values existed, I’m just changing my scripts to see if it’ll work with that

Edit: Still having an issue with getting it to work with Color3Values but I think I may know where I went wrong

After experimenting a bit, I found out that I needed to use wait, and it is now working correctly.

By the way, small tip: use game:GetService(“RunService”).Heartbeat:Wait() instead of wait(). Better practice

By the way, small tip: use task.wait() instead of game:GetService(“RunService”).Heartbeat:Wait(). Better practice

1 Like

I unmarked the solution as it turns out that it’s still not working, trying to figure out what is going wrong, printing the accentvalue shows that it’s setting the colour to black


Changing this shows something that’s even more confusing

image

image


I’m leaving the plugins source code here as I honestly do not know what’s happening

Roblox Fast Donation Button Creation v3.rbxmx (165.4 KB)

How are you setting the AccentColor value? Also, you need to stop using .Parent chains because that makes your scripts messy, makes them hard to read and generally it’s a bad practice.

Why are you using tonumber(getsetting)? Just do accentvalue.Value = getsetting;

Removing that still doesn’t make a difference


Linking source code once again because it’s hard to see what the issue is

Roblox Fast Donation Button Creation v3.rbxmx (165.4 KB)

No. You need to replace the else line with the line that i’ve sent you.

instead of accentvalue.Value = Color3.fromRGB(tonumber(getsetting))

Also, please don’t use rbxmx files, just send me your current code here instead. I don’t need to read all of your scripts.

I did replace that, it didn’t make a difference

Still getting this

image

Well because you obviously are setting the BackgroundColor3 wrong.
Change par.BackgroundColor3 = Color3.fromRGB(par.Parent.Parent.Parent.AccentColour.Value) to just par.BackgroundColor3 = par.Parent.Parent.Parent.AccentColour.Value.

I don’t think you are understanding me, and also the code you sent won’t work because it’s not a Color3.fromRGB/Color3.new.

Doesn’t matter. Color3 holds a Color3 value duh, so it will work. Why are you unnecessarily over complicating stuff?

1 Like

I still don’t think you’re understanding the issue now, I’m just going to give up since there’s clearly nothing that can be done

What?? Have you even tried replacing the line? Or are you just straight-up assuming that I’m in the wrong here?

1 Like

I know it is nothing related to that, I think it could be due to me using a Color3Value I don’t know

If you are not taking my advice, then why did you post on Help and Feedback? It seems that you apparently know better whats the issue so you should be able to easily solve it on your own.

1 Like

I’m not able to easily solve it though, I really don’t know why it is happening, I’m probably just going to end up deleting the accent colour stuff

Edit: could have maybe just figured it out, it was due to using a Color3.fromRGB here:

image

Alright. If you’re not listening to me and not reading my replies at all then I’m not going to help you with your issue any further.

1 Like