Nobody else in the server can see the torso change color, probably because the code is in a local script in StarterGui but how could I convert it to a serverscript?
while true do
local RColor = script.Parent.RedBar.SliderValue.Text
local GColor = script.Parent.GreenBar.SliderValue.Text
local BColor = script.Parent.BlueBar.SliderValue.Text
local player = game.Players.LocalPlayer
repeat wait() until player.Character
local BC = player.Character:WaitForChild("Body Colors")
BC.TorsoColor3 = Color3.fromRGB(RColor,GColor,BColor)
end
send the color values to a server script through a remote event and just change it on the server
create a remote event in replicated storage
create a server script in serverscriptservice and paste this there:
local Remote = game:GetService("ReplicatedStorage").RemoteEvent
Remote.OnServerEvent:Connect(function(Caller, R, G, B)
Caller.Character:WaitForChild("Body Colors").TorsoColor3 = Color3.fromRGB(R, G, B)
end)
and replace your local script with this:
local Remote = game:GetService("ReplicatedStorage").RemoteEvent
while true do
local RColor = script.Parent.RedBar.SliderValue.Text
local GColor = script.Parent.GreenBar.SliderValue.Text
local BColor = script.Parent.BlueBar.SliderValue.Text
Remote:FireServer(RColor, GColor, BColor)
end