Server script:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local Events = ReplicatedStorage.Events
local function updateBodyColors(player)
local Character = player.Character
Character["Body Colors"].HeadColor3 = Color3.fromRGB(player.CharacterInfo.HeadColor.Value)
Character["Body Colors"].TorsoColor3 = Color3.fromRGB(player.CharacterInfo.TorsoColor.Value)
Character["Body Colors"].RightArmColor3 =Color3.fromRGB(player.CharacterInfo.RightArmColor.Value)
Character["Body Colors"].LeftArmColor3 = Color3.fromRGB(player.CharacterInfo.LeftArmColor.Value)
Character["Body Colors"].RightLegColor3 = Color3.fromRGB(player.CharacterInfo.RightLegColor.Value)
Character["Body Colors"].LeftLegColor3 = Color3.fromRGB(player.CharacterInfo.LeftLegColor.Value)
ReplicatedStorage.Events.UpdatePreview:FireClient(player)
end
Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function()
task.wait(3)
updateBodyColors(player)
end)
end)
Events.UpdateBodyColor.OnServerEvent:Connect(function(player, bodyPart, color)
local Character = player.Character
player.CharacterInfo[bodyPart].Value = color
Character["Body Colors"][bodyPart .. "3"] = Color3.fromRGB(color)
ReplicatedStorage.Events.UpdatePreview:FireClient(player)
end)
Local script:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
local Events = ReplicatedStorage.Events
local container = script.Parent
local textBox = container.TextBox
textBox:GetPropertyChangedSignal("Text"):Connect(function()
local bodyColor = textBox.Text
local defaultColor = textBox.PlaceholderText
if bodyColor ~= "" then
Events.UpdateBodyColor:FireServer(container.Name, bodyColor)
else
Events.UpdateBodyColor:FireServer(container.Name, defaultColor)
end
end)
textBox.Text = LocalPlayer.CharacterInfo[container.Name].Value
As you can see my character is just black.
No problems with the CharacterInfo values.