i'm making a machine that tells you the color of the part that another brick is touching but it always brings out a non exact number (like 0.35.. instead of something like 128)
is there a way to make it display the exact rgb values? this would be really useful because it's the last thing i need to complete this, this is the current code i'm using
screen.R.Text = hit.Color.R screen.G.Text = hit.Color.G screen.B.Text = hit.Color.B
could anyone here help me with this? it would be really useful
You would just mutiply the R, G, B values by 255.
screen.R.Text = hit.Color.R * 255 screen.G.Text = hit.Color.G * 255 screen.B.Text = hit.Color.B * 255
try this, i have never done somethink like that before but it may work
screen.R.Text = tostring(tonumber(hit.Color.R)) screen.G.Text = tostring(tonumber(hit.Color.G)) screen.B.Text = tostring(tonumber(hit.Color.B))