Color3 changing avatar color but not getting saved into Value

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I would like to be able to save the Color3 value sent by another script into the Attribute of a string value.The used script to change the avatar color is a module script. The one used to start the function is a local script.

  2. What is the issue? Include screenshots / videos if possible!
    The following script gets the player and the Color3 variable. The script changes the body of the avatar to the right color, but it doesn’t store that color into the value.

function ChangeNameColor.ChangeColor(player, Color)
	
	local Tag = game.Workspace.Date.Players:FindFirstChild("=" .. player.Name)

	local Colore = Tag:GetAttribute("Colore")
	local Character = game.Workspace:FindFirstChild(player.Name)
	local BodyColors = Character.BodyColors
	
	Colore = Color.Value -- the color doesn't get saved into the value Colore
	BodyColors.LeftLegColor3 = Color.Value
	BodyColors.RightLegColor3 = Color.Value
	BodyColors.TorsoColor3 = Color.Value
	
end
  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    Tried to look around the web, no solution found.
1 Like

Is color argument a instance ???
Also change local Character = game.Workspace:FindFirstChild(player.Name) to local Character = player.Character

Writing Colore = Color.Value is just overwriting the Colore variable, instead, you would want to utilize the set attribute function

Tag:SetAttribute("Colore",Color.Value)
1 Like

@paulocezarnbr
Color is a Color3Value in the workspace.
Changing that line hasn’t fixed the problem :frowning:
Now in the line with the problem the error is:

value cannot be assigned to - Client -

1 Like

@PuffoThePufferfish After adjusting this line the problem that the studio tells me its:

Value is not a valid member of Color3 - Client -

Had a little problem in the script that was sending the informations to the module script.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.