Printing, values, and scripts all mismatching

Hi there, my code isn’t working for a character customization editor. I want to make it so the player selects a body part to change color of, and then press the desired color. It works… for the head. See, I am changing a string value to find in the dummy. Then I use a remote event to send the bodypart value and color. However, no matter what bodypart I choose, it just changes the head. I also made it print what body part it is changing, and it printed head, while bodypart value was something else. Along with the gui. This is my code.
Bodyparts:

script.Parent.Activated:Connect(function()
	script.Parent.Parent.BodyPart.Value = script.Parent.Text
end)

Gui Change:

--I know it isn't optimal but I didn't wanna go through the tedious action of changing all the scripts as I forgot.
while true do
	wait(.1)
	script.Parent.Text = ("Body Part: "..script.Parent.Parent.BodyPart.Value)
end

RemoteEvent:

local ReplicatedStorage = game:GetService('ReplicatedStorage')

local BodyPart = script.Parent.Parent.Parent.Body_Part.BodyPart
local Color = script.Parent.BackgroundColor3
script.Parent.Activated:Connect(function()
	ReplicatedStorage.Color:FireServer(BodyPart, Color)
end)


Also, I can provide any additional information if needed. Please help.

Sounds like the issue might be with how you’re accessing the BodyPart value. Make sure that you’re using the right variable name throughout your code. For example, in the Bodyparts script, you’re setting the value to “script.Parent.Parent.BodyPart.Value,” but in the RemoteEvent script, you’re using “script.Parent.Parent.Parent.Body_Part.BodyPart,” which could be a different value.

You could try using a print statement in the script that calls the RemoteEvent to see what the value of BodyPart and Color are right before you fire the event. This might help you identify where the issue is coming from.

Also, it might help to ensure that the script that contains the RemoteEvent is only firing when the player has selected a body part to customize. If the script is firing every time the player clicks on a color option, that could be causing the issue.

Body_Part is the container for bodypart value. Tried that and it was interesting. I tried color red and it said BodyPart 1, 0, 0 from client and Head,1, 0, 0. from server, but with white, it said Head 1, 0, 0 twice both from the events script(server).