Script doesnt register TextBox text

There is no data, its just nothing.

Also this was line 93 (now its line 94): target.Color = Color3(data)

This is the code at the top (the original post). Let’s say a user types “0,255,0” into the TextBox. Couldn’t you use the following code to achieve what you wish?

            if mode.Value == 5 then --Color
				local colorinput = player.PlayerGui.LoadoutGui.Loadout.SpawnMenu.Loadout.RGB.Text
                local colorsplit = string.split(colorinput, ",")
                local notanumber = false
                for _, color in pairs (colorsplit) do
                    if tonumber(color) or tonumber(color) > 255 or tonumber(color) < 0 then
                        notanumber = true
                    end
                end
                if notanumber then
                    return --or break depending on what it is
                end
				if target.Locked == false then
					target.Color = Color3.fromRGB(colorsplit[1], colorsplit[2], colorsplit[3])
					print(color)
				end
			end
		end

Well apparently not since I get this error now.

Also yes in the textbox you are supposed to type “0,0,0” to get the color that you want.

When this error occured I typed in “0,255,0”.

Write a print(color) right after the for statement.

Well it already looks like its gonna end badly but sure why not.

It didnt even print anything.

This thing wants me to waste 3 hours on one mode.

By after, I mean inside, the first line inside. My bad for not clarifying.

Oh sure, gonna do that right now.

Also I removed the whole if statement, and the part just turned black no matter what RGB value I typed in.

It still prints nothing.

I never thought I would waste 3 hours over a TextBox, but here we are.

I said first line right after the do in the for statement.

                for _, color in pairs (colorsplit) do
                    print(color)
                    if tonumber(color) or tonumber(color) > 255 or tonumber(color) < 0 then
                        notanumber = true
                    end
                end

Oh alright I am sorry, gonna do that right now.

No need to be.

Well, after not printing anything, it got a bit bored.

It printed nothing this time.

Was the original script on the server?

You mean the one where I put the code in?

And if you do mean that one, yes it is.

Can you send me the full script?

Do you have a discord?

If yes it would be easier.

And we have been talking for like 1 hour

Mercurial#2882