i want to print Color3 Value in the output as RBG
but for some reason its printing else. thanks for help
local color = script.Parent.Value
print(Color3.fromRGB(color.R,color.G,color.B))
i want to print Color3 Value in the output as RBG
but for some reason its printing else. thanks for help
local color = script.Parent.Value
print(Color3.fromRGB(color.R,color.G,color.B))
I think thats printing the brickcolor
I had the same problem too, its not exactly correct
How i fixed mine was editing it in the color page or smth and adjusted the RGB values myself
print( Color3 )
prints as RGB (0-1) by default, if you want RBG then you can do this:
print(color.R, color.B, color.G)
not correct its still prints the same.
Do you mean you want to print something like 125, 31, 255
?
(RGB or RBG??)
yes thats what i want to be as same as the value in the workspace
What CoderHusk said but deleted:
print(
math.round( color.R * 255 ),
math.round( color.G * 255 ),
math.round( color.B * 255)
)
In the post you said RBG instead of RGB, so I thought you were asking about the ordering of the colours. Not how to convert 0-1 to 0-255
its not working in my actual script, the images i sent above is for example, but in my actual script its not working.
local player = game.Players.LocalPlayer
local NameTagValue = player:FindFirstChild("NameTagToSave")
local Color = NameTagValue:FindFirstChild("Color").Value
NameTagValue.Changed:Connect(function()
print(math.round(Color.R * 255), math.round(Color.G * 255), math.round(Color.B * 255))
end)
What if you change it to this?
local player = game.Players.LocalPlayer
local NameTagValue = player:FindFirstChild("NameTagToSave")
local ColorValue = NameTagValue:FindFirstChild("Color")
NameTagValue.Changed:Connect(function()
local Color = ColorValue.Value
print(math.round(Color.R * 255), math.round(Color.G * 255), math.round(Color.B * 255))
end)
i already did that above look in the script
No, I moved .Value
into the changed event
yes still prints 0,0,0 but in the right side when i click on the color3 value it is different color not 0,0,0
local player = game.Players.LocalPlayer
local NameTagValue = player:FindFirstChild("NameTagToSave")
local ColorValue = NameTagValue:FindFirstChild("Color")
NameTagValue.Changed:Connect(function()
local Color = ColorValue.Value
print(math.round(Color.R * 255), math.round(Color.G * 255), math.round(Color.B * 255))
end)
i don’t know why its not working here. i did what you said and i have no clue to what to do
When and where are you changing the ColorValue
and when and where are you changing the NameTagValue
?
colorvalue changing when player pressing button on gui
same as the nametag value
script.Parent.MouseButton1Click:Connect(function()
local player = game.Players.LocalPlayer
local NameTagValue = player:FindFirstChild("NameTagToSave")
local ColorTag = NameTagValue:FindFirstChild("Color")
NameTagValue.Value = "Newbie"
ColorTag.Value = Color3.fromRGB(84, 135, 255)
end)
its changeing on the actual color value but in the output not
You’re changing the NameTagValue
before you change the ColorTag
value.
So the Changed event will run in between the below 2 lines.
You can either change the order of setting the values,
or you can change NameTagValue.Changed
to ColorValue.Changed
look what i need is to fire to server the changes made to the ColorTag and the NameTagValue
then it will go to server and change it to everyone the name of player and the color of it