Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

how do you change the value inside of a color3 value with a script?

I tried to make it so the color3 value changes to the part's color, However, I just got a bunch of non-color3 values, what do I do

Script:

local colorVal = script.Parent
local part = script.Parent.Parent.Parent
local partColor = part.Color
colorVal = Color3.fromRGB(partColor)

print(colorVal)

1 answer

✓ Accepted answer

so i f i understand this correctly, you are trying to change colorVal's color to part's color, simple, you just need to assign the color3 value to it, which you didnt do, so here is your new code:

local colorVal = script.Parent
local part = script.Parent.Parent.Parent
local partColor = part.Color
colorVal.Color = Color3.fromRGB(partColor)

print(colorVal.Color)

since colorVal is script.Parent, it wont print a color3 value, you have to tell it to print the property, color3, from colorVal.\

hope this helps :3

This discussion is preserved as it was. New answers, comments, and votes are closed.