Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Text -> Array? for setting Color3 Values from a textbox

Asked by 5 years ago

module.AddTab('Settings','Settings')

_,option1 = module.AddInputButton('ChangeTextColor','Set Options TextColor3','Color3','Settings',function()

module.ChangeOptionTextColors(Color3.fromRGB())

end)

_,option2 = module.AddInputButton('ChangeTextColor','Set Title TextColor3','Color3','Settings',function()

module.ChangeTitleTextColors(Color3.fromRGB())

end)

_,option3 = module.AddInputButton('ChangeTextColor','Set Title BackgroundColor3','Color3','Settings',function()

module.ChangeTitleBackgroundColor(Color3.fromRGB())

end)

_,option4 = module.AddInputButton('ChangeTextColor','Set Background Color3','Color3','Settings',function()

module.ChangeBackgroundColors(Color3.fromRGB())

end)

Got a module script, linked for making GUIs, but I dont want to make the changecolor thing a shitty 3textboxes, i'd rather you just type the value ( 150,25,176) then a stringsplitter to turn it into an array I can use,

This was my attempt at a string splitter

function stringsplit(str,splitpoint)

local ret = {}

local lastsplit = 0

for i=1,str:len() do

if str:sub(i,i) == splitpoint then

print'splitting'

table.insert(ret,str:sub(lastsplit+1,i-1))

lastsplit = i

else

print(str:sub(i,i))

end

end

return(unpack(ret))

end

Answer this question