Another Topic about Help i need

So I made a new topic, so I can explain myself better at what I want to achieve.

So I made this GUI
image
It’s used to input value of R G B

But the problem I have is that when I click apply, the torso and overhead/Billboard GUI don’t change color because for some reason I’ll send a few examples


the problem is from what I can see is that I can in fact access the color but the one before applying so with its original color and its server sided the working one is client sided

What code are you using for this??

I am using a remote event so which both?

Both client and server if possible.

Client /GUI

    local RE = script.Parent.Parent.Frame.R
    local GR = script.Parent.Parent.Frame.G
    local BL = script.Parent.Parent.Frame.B
    local AP = script.Parent.Parent.Frame.Apply




AP.MouseButton1Click:Connect(function()
	AP.Part.Color = Color3.fromRGB(RE.Text,GR.Text,BL.Text)
	game.ReplicatedStorage.Events.Change:FireServer()
end)

Server/ServerScriptService

local event = game.ReplicatedStorage.Events.Change


event.OnServerEvent:Connect(function(player)
	local character = player.Character
	local torso = character:WaitForChild("Torso")
	local head = character:WaitForChild("Head")
	local part = player.PlayerGui.ScreenGui.Frame.Apply.Part.Color

	torso.Color = part
	head.BillboardGui.TextLabel.TextColor3 = part
	head.BillboardGui.TextLabel2.TextColor3 = part
end)

It’s probably because the part’s colour is the initial colour, you’re only changing its colour on the client so it doesn’t appear on the server.

Send the colour to the server

game:GetService('ReplicatedStorage').Events.Change:FireServer(RE.Text, GR.Text, BL.Text)

Then on the server,

event.OnServerEvent:Connect(function(player, red, green, blue)
	local character = player.Character
	local torso = character:WaitForChild("Torso")
	local head = character:WaitForChild("Head")

	torso.Color = Color3.fromRGB(red, green, blue)
	head.BillboardGui.TextLabel.TextColor3 = Color3.fromRGB(red, green, blue)
	head.BillboardGui.TextLabel2.TextColor3 = Color3.fromRGB(red, green, blue)
end)
3 Likes

This makes so much sense, you’re truly a genius

2 Likes