✓ Accepted answer
Well, the problem is line 3-ish(?): you're trying to get a colour from the player's character itself, which is a model, and with a model, it doesn't come with a colour for itself. XP
However, depending if a player is using a R6 or R15, you can directly get the Colour(3) from the player's Torso or Upper... Lower... HumanoidRootPart... Idk. ;-; But, anyways, you can get the colour from the whatever the dang R15 objects are...
To be more specific about what I mean, you could get the colour using a fun(ny) little bit of code, rarely known of by the name of .Color. ...Yes, it's that simple, but ROBLOX doesn't wanna make it that simple for new players! :D Ok, back on topic, you can retrieve the Colour(3) of an object (or part) by using this neat trick. ;P (Click here for an example of this, or read the following code)
An example of this would be:
local PlayersTorso = Character:FindFirstChild('Torso') or Character:WaitForChild('UpperTorso')
local ColourToGUI = PlayersTorso.Color
GUI.BackgroundColor3 = ColourToGUI
And that's pretty much it. lol There's not much more to talk about, but I would like to add that you can do this vise-versa: you can set the player's Torso/ other object colour to a GUI's background colour too! :O (Click here for an example/ a better explanation on this/ if it's too awesome to believe!!! :O )
Hope this helped you in any way! :D
1 comment
I got it now thanks.