Hello I am trying to make a script that takes user input for an RGB color code and turns it into the text color for a SurfaceGUI. The user input is represented in three different text boxes. One is for the red value, one is for the green value, and the other is for the blue value. The issue I am running into is the fact that my output is false. This is what I currently have for the script (it is a LocalScript):
Submit = script.Parent.Submit
RedInput = script.Parent.Red.Text
GreenInput = script.Parent.Green.Text
BlueInput = script.Parent.Blue.Text
Red = tonumber(RedInput)
Green = tonumber(GreenInput)
Blue = tonumber(BlueInput)
Submit.MouseButton1Click:connect(function()
local player = game.Players.LocalPlayer
local booths = workspace.under:GetChildren()
for i,v in pairs(booths) do
print(v.upforgrabs.Value == true)
if v.owner.Value == player.Name then
local TCInput = Color3.fromRGB(Red, Green, Blue)
v.Screen.SurfaceGui.Frame.UserText.TextColor3 = TCInput
v.Screen.SurfaceGui.Frame.OwnershipStatus.TextColor3 = TCInput
else
assert("WHOOPS")
end
end
script.Parent.Visible = false
script.Parent.Parent.BoothEdit.Visible = true
end)
-- local a,b,c = string.match("255, 0, 0", "(%d+),* *(%d+),* *(%d+),* *")
-- local color = Color3.new(a,b,c)
In addition, this script is located in StarterGui.ScreenGui.TCF.
