Hello, I am experiencing an issue where the Color3 values are inverting for me when I return them from a function. Here is the script.
local function c3(hex) -- from https://gist.github.com/jasonbradley/4357406
hex = hex:gsub("#","")
local r, g, b = tonumber("0x"..hex:sub(1,2)), tonumber("0x"..hex:sub(3,4)), tonumber("0x"..hex:sub(5,6))
return Color3.new(r,g,b)
end
Confirm.MouseButton1Click:Connect(function()
print(c3(Hex.Value.Text))
FlareColorEvent:FireServer(c3(Hex.Value.Text))
script.Parent:Destroy()
end)
event.OnServerEvent:Connect(function(plr,Color)
print(plr)
print(Color)
script.Parent.Handle.Part.Color = Color
script.Parent.Handle.Part.PointLight.Color = Color
script.Parent.Handle.Part.Smoke.Color = Color
end)
On the print(Color) line, it prints the Color3 values the right way round, but when I change the color of the brick, the values are inverted.