I’m trying to get a players cloths and skintone on a startercharacter.
I’ve tried to find out how for sooooo many days and everything I try fails.
how can I do this?
I’m trying to get a players cloths and skintone on a startercharacter.
I’ve tried to find out how for sooooo many days and everything I try fails.
how can I do this?
Place a script on StarterCharacterScripts and you can start detecting stuff:
Example on how to detect clothes:
local character = script.Parent
local shirt = character:FindFirstChildOfClass("Shirt")
local pants = character:FindFirstChildOfClass("Pants")
if shirt then
print("Character has a shirt!")
elseif pants then
print("Character has pants!")
end
Example on how to detect skin tone/body colors:
-- If your character has a BodyColors object you can detect it
local character = script.Parent
local bodycolors = character:WaitForChild("Body Colors")
print(bodycolors.HeadColor)
-- Alternative way using dictionaries
local colors = {}
for index, child in pairs(character:GetChildren()) do
if child:IsA("MeshPart") or child:IsA("BasePart") then
colors[child.Name] = child.Color
end
end
print(colors["Head"]) --> Color of the head
I tried this out however nothing happened no errors no printing
Okay I got it to work but the body color changes into the defult roblox colors
You need to change that yourself
Are you sure you got it on the right spot?
I put it in starterplayer starterCharacterScripts