Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to change body color of a player ?

So... i'm trying to make a drink , when you drink it your skin turns blue , it's like a ice potion sooo... i don't really know how to select the player's body color.Sorry for the issue Also here is my script

local hum = nil
local char = nil
----------------------------------
function onActivate()
    if not enabled then
        return
end
enabled = false
tool.GripForward = Vector3.new(0,-.759,-.651)
tool.GripPos = Vector3.new(1.5,-.5,.3)
tool.GripRight = Vector3.new(1,0,0)
tool.GripUp = Vector3.new(0,.651,-.759)
local char = tool.Parent
local hum = char:FindFirstChild("Humanoid")
if hum then
if hum.WalkSpeed == 16 then
  hum.WalkSpeed = 23
hum.["Body Color"
  tool.bruh:Play()
wait(2)

tool.GripForward = Vector3.new(-.976,0,-0.217)
tool.GripPos = Vector3.new(0.03,0,0)
tool.GripRight = Vector3.new(.217,0,-.976)
tool.GripUp = Vector3.new(0,1,0)

wait(8)
hum.WalkSpeed = 16
enabled = true
end
local hum = nil
local char = nil
end
end
function onEquipped()
    tool.lma0:Play()
end
tool.Activated:Connect(onActivate)
tool.Equipped:Connect(onEquipped)

1 comment

1

You can use body colors to change the player's body color; https://developer.roblox.com/en-us/api-reference/class/BodyColors

1 answer

for i,v in next, game.Players:GetPlayers() do
    local c = v.Character or v.CharacterAdded:Wait()
    local bc = c:WaitForChild("Body Colors")
    local og = bc.TorsoColor3
    bc.TorsoColor3 = Color3.fromRGB(255,0,0)

    bc.TorsoColor3 = og
end

Solved in DISCORD

1 comment

0

accepted

This discussion is preserved as it was. New answers, comments, and votes are closed.