Hi everybody,
I'm making a system where you enter in a Color3 value (one in each box) and all the lights around you tween to the colour that was put in the textboxes. The obvious issue is each value is a string and not a number which therefore can't be used in a Color3Value. What would be the best way to convert a string into a Color3 that can be used later, I have a bit of code so you can see what I'm getting at (I'm probably going in the wrong direction
local AdvancedMode = script.Parent
local BasicMode = AdvancedMode.Parent.BasicMode
local modetoggle = AdvancedMode.Parent.modetoggle
local confirmbtn = AdvancedMode.confirmbutton
local inputR = AdvancedMode.inputR
local inputG = AdvancedMode.inputG
local inputB = AdvancedMode.inputB
local CurrentColour = AdvancedMode.CurrentColour
confirmbtn.MouseButton1Click:Connect(function()
print('test')
local inputR_numb = inputR.Text
local inputG_numb = inputG.Text
local inputB_numb = inputB.Text
print(inputR_numb,inputG_numb,inputB_numb)
local combo = inputR_numb..','..inputG_numb..','..inputG_numb
--combo = tonumber(combo) tried, doesn't work.
CurrentColour.Value = combo
end)
The error I get when I run this (with tonumber bit) invalid argument #3 (Color3 expected, got nil)
The error I get without the tonumber bit invalid argument #3 (Color3 expected, got string)
Same errors but at least I know I'm probably on the right track with tonumber.
That's pretty much everything

3 comments
Have you tried Color3.new(inputR.Text,inputG.Text,inputB.Text)? (and with tonumber aswell)
I would also check to see if the input is a number with the inbuilt function tonumber() this function returns nill if you input letters. It should also work with float values too!.... EG print(tonumber("0123")) -- 123 Print(tonumber("0.123")) -- 0.123 print(tonumber("hello") -- nil
Problem solved, pretty sure I created a new color3 and ran math.ceil on each value