Why isn't this working?

The most important question here is what does the text say?

1 Like

you need to change text manually in studio,
image
in the textbox object

2 Likes

it’s meant to be blank your meant to put in your own color

1 Like

Screenshot 2024-11-16 200932
this is a placeholder text btw

1 Like

add this code to a localscript and it should work properly

local debounce = false
local localPlayer = game:GetService("Players").LocalPlayer
local clickDetector = workspace:WaitForChild("Part").ClickDetector

clickDetector.MouseClick:Connect(function(player)
	if player ~= localPlayer then return end
	if debounce == false then
		local thing = game.Workspace.test1.SurfaceGui.TextBox.Text
		debounce = true
		local r, g, b = string.match(thing, "%s*(%d+%.?%d+)%s*,%s*(%d+%.?%d+)%s*,%s*(%d+%.?%d+)%s*")
		if not r or not g or not b then
			debounce = false
			print("Didn't format the RGB correctly")
			return
		end
		game.Workspace.Theball.Color = Color3.fromRGB(tonumber(r), tonumber(g), tonumber(b))
		game.Workspace.Thenewball.Color = Color3.fromRGB(tonumber(r), tonumber(g), tonumber(b))
	end
	task.wait(10)
	debounce = false
end)
2 Likes

nvm just realized it doesnt go there

2 Likes

no, place the localscript in StarterPlayer → StarterPlayerScripts. replace the clickdetector path to your own clickdetector path

3 Likes

i tried it and it worked tysm bro

4 Likes