Part colour change script not working

Hi all, it’s me again. I’m just wondering how to make this script work. I have used the scripts from past posts I have made, but they did not seem to work.

Here is my code! <3

Local Script (The script that fires the remote event.)

local colv = game:GetService("ReplicatedStorage").ColourValues.Colour
local event = game.ReplicatedStorage.ChangeColour

script.Parent.MouseButton1Click:Connect(function()
	event:FireServer(colv)
	script.Parent.Text = "Done"
	wait(1)
	script.Parent.Text = "CONFIRM"
end)

And here’s my script in server script service!

local parts = game.Workspace.NeonParts:GetChildren()

game.ReplicatedStorage.KickPlayer.OnServerEvent:Connect(function(colv)
	for i, v in pairs(parts) do
		v.Color = Color3.fromRGB(colv)
	end
end)

Here is what the GUI looks like.
image

What are you trying to do?

I am trying to make it so when you click “Yellow” or “Red” ect, it will get the colour red ect and put it in a Colour3Value. And when you click confirm, it will fire a remote event and the remote event will then get all neon parts and change the colour of them to the colour in the Colour3Value value.

What’s the issue?

I can’t get it to work! No output is sent either.

What have you tried so far?

I have taken scripts from my past posts.

Your server script is using KickPlayer while your client is using ChangeColour. Make sure you are connecting to the same remote that you are firing.

1 Like

Omg, I’m actually so unorganised… I copied the script from another script. Thanks for pointing that out.

1 Like