So as you can see, even though the arm colors are just one number off, they are producing very different results, both of which aren’t the color shown on the color swatch.
When I go into the body colors of the character this is what’s happening:
The colors aren’t even the ones I’m specifying…
Here’s my code:
Local:
local red
local green
local blue
script.Parent.FocusLost:Connect(function(enterPressed, inputObject)
if enterPressed then
local color = string.split(script.Parent.Text, ",")
for i, v in ipairs(color) do
if i == 1 then
red = tonumber(v)
elseif i == 2 then
green = tonumber(v)
elseif i == 3 then
blue = tonumber(v)
end
end
script.Parent.Parent.ImageLabel.BackgroundColor3 = Color3.fromRGB(red, green, blue)
game:GetService("ReplicatedStorage").RemoteEvent2:FireServer(red, green, blue, "LeftArmColor3")
end
end)
Server-side:
game:GetService("ReplicatedStorage").RemoteEvent2.OnServerEvent:Connect(function(p, r, g, b, a)
p.Character["Body Colors"][a] = Color3.fromRGB(r, g, b)
end)
If anyone knows what’s going on this would be great, thanks.
No, no error codes. That’s the weird part… I know this code should work perfectly, but look how messed up the Body Colors are versus the color swatch that is the exact same value (or should be)