This is a great creation to develop your scripting skill. However, this post is also not in the right category. Instead of Help and Feedback, you could change it to Community Resources. 
Apart from that, I wanted to share with you several beginner flaws and bad practices with your code in hopes that you can put them to good use…
First, you’re using multiple LocalScripts which is completely unnecessary, and the fact that you’re using a loop, and specifically while wait() do
is quite a red flag. instead of looping to check for changes, which can take up a bit of performance when used many times, you can listen for changes.
The best and most precise way to do this is with GetPropertyChangedSignal, which is better than the Changed
function. Plus, you will be using it for many different things in the future such as cash labels.
Also, you’re not checking if what the player put in the TextBoxes are numbers, which will error if they type anything other than a number.
With this in mind, we can re-write your code into one LocalScript: (parented to ScreenGui)
local replicatedStorage = game:GetService("ReplicatedStorage")
local lastColor = nil
local lastClicked = 0
local function updatePreview()
pcall(function()
script.Parent.Color3.BackColor = Color3.fromRGB(
script.Parent.Red.Text,
script.Parent.Green.Text,
script.Parent.Blue.Text
)
end)
end
script.Parent.Accept.MouseButton1Click:Connect(function()
if tick() - lastClicked < 3 then return end -- 3 second cooldown.
if lastColor == string.format("%i, %i, %i",
script.Parent.Red.Text, script.Parent.Green.Text, script.Parent.Blue.Text)
then return end -- Returns end if the color is the same to not over-use the RemoteEvent.
if not replicatedStorage:FindFirstChild("ColorChange")
or not tonumber(script.Parent.Red.Text)
or not tonumber(script.Parent.Green.Text)
or not tonumber(script.Parent.Blue.Text)
then return end -- Returns end if the RemoteEvent doesn't exist or if any of the text isn't a number.
lastClicked = tick()
lastColor = string.format("%i, %i, %i",
script.Parent.Red.Text, script.Parent.Green.Text, script.Parent.Blue.Text)
replicatedStorage.ColorChange:FireServer(
Color3.fromRGB(
script.Parent.Red.Text,
script.Parent.Green.Text,
script.Parent.Blue.Text
)
)
end)
script.Parent.Red:GetPropertyChangedSignal("Text"):Connect(updatePreview)
script.Parent.Green:GetPropertyChangedSignal("Text"):Connect(updatePreview)
script.Parent.Blue:GetPropertyChangedSignal("Text"):Connect(updatePreview)
This kinda looks complex but I added some checks and a cooldown system.
Script in ServerScriptService: (much calmer)
local replicatedStorage = game:GetService("ReplicatedStorage")
local _workspace = game:GetService("Workspace")
replicatedStorage.ColorChange.OnServerEvent:Connect(function(player, color)
if not color then return end
_workspace.Part.Color = color
end)
Note: These scripts are untested and improvised. If you plan to use them and encounter an error, try to fix it yourself or reply back for some help.