Hi there,
I'm trying to make a Color3 selection system, the idea is you put a value into each of 3 textboxes and the lights around you tween to the colour you inputted into the boxes, but if somebody put something that wasn't of 3 characters or contained anything but numbers, you'd get an error which is common sense, of course as I said in the previous question I could just filter it out and display an error message and not fire the remote, but I want it to be instantaneously removing characters if they're the 4th character+
So far my code is as follows;
local advancedmode = script.Parent
local inputR = advancedmode.inputR
local inputG = advancedmode.inputG
local inputB = advancedmode.inputB
while wait() do
if string.len(inputR.Text) >= 4 then
local charstodel = string.len(inputR.Text) - 3
print(charstodel)
-- // How do I delete the right amount of characters from the string value? \\ --
end
end
So how would I delete the amount of characters that is specified in the local variable charstodel?
Also you can review my previous question here despite it not going into much detail because I had no idea what to do at the time, but thankfully now I do (at least a little bit)

2 comments
wait so you want to make sure each color3 value is a max of 3 digits?
and if any number is is 4 digits roundn to 255