You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I want all the parts of the player to be black but not the head because it looks better like that when i use my star wars morphs. -
What is the issue? Include screenshots / videos if possible!
No matter what i do for some reason i cant change the body color -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I didnt find anything on the dev forum, youtube and chatgpt didnt work there is also no errors
I have tried chaning the colors of the Body Colors thing with this:
newCharacter:FindFirstChildOfClass("BodyColors")
BodyColors.LeftArmColor3 = Color3.new(0, 0, 0)
BodyColors.LeftLegColor3 = Color3.new(0, 0, 0)
BodyColors.RightArmColor3 = Color3.new(0, 0, 0)
BodyColors.RightLegColor3 = Color3.new(0, 0, 0)
BodyColors.TorsoColor3 = Color3.new(0, 0, 0)
BodyColors.HeadColor3 = Color3.new(0.917647, 0.721569, 0.572549)
and just without changing the Body Colors thing:
for i, v in newCharacter:GetChildren() do
if v:IsA("MeshPart") and v.Name ~= "Head" then
v.Color = Color3.new(0, 0, 0)
end
end
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
Script
MainMenuMorphRemotes.TeamsRemotes.SWATTeamRemoteEvent.OnServerEvent:Connect(function(player, teamName, group)
if player:IsInGroup(group) then
player.Team = teamName
local rankInGroup = player:GetRankInGroup(34612531)
local oldCharacter = player.Character
local morphModels = {
[66] = game.ServerStorage.Morphs.MainArmy.NavyHICOM["Grand Admiral"],
[65] = game.ServerStorage.Morphs.MainArmy.NavyHICOM["Fleet Admiral"],
[64] = game.ServerStorage.Morphs.MainArmy.NavyHICOM["Admiral"],
[63] = game.ServerStorage.Morphs.MainArmy.NavyHICOM["Vice Admiral"],
[53] = game.ServerStorage.Morphs.MainArmy.NavyLR["Officer"],
[1] = game.ServerStorage.Morphs.MainArmy.Army["Trooper"]
}
local morphModel = morphModels[rankInGroup]
if rankInGroup < 52 then
morphModel = game.ServerStorage.Morphs.MainArmy.Army["Trooper"]
elseif rankInGroup >= 53 and rankInGroup <= 63 then
morphModel = game.ServerStorage.Morphs.MainArmy.NavyLR["Officer"]
end
if morphModel then
local newCharacter = morphModel:Clone()
local playerface = oldCharacter.Head.face:Clone()
playerface.Parent = newCharacter.Head
newCharacter.Name = player.Name
newCharacter.HumanoidRootPart.Anchored = false
newCharacter.HumanoidRootPart.Anchored = false
newCharacter:SetPrimaryPartCFrame(oldCharacter.PrimaryPart.CFrame)
for i, v in ipairs(oldCharacter:GetChildren()) do
if v:IsA("Script") or v:IsA("LocalScript") then
v:Clone().Parent = newCharacter
end
end
player.Character = newCharacter
newCharacter.Parent = workspace
for i, v in game.ReplicatedStorage.PlayersCharacter:GetChildren() do
if v.Name == player.Name then
v:Destroy()
end
end
newCharacter:Clone().Parent = game.ReplicatedStorage.PlayersCharacter
TeleportPlayerOnceTeamChoosen(player, player.Character)
else
-- Keep the player's original character if no morph model is found
player.Character = oldCharacter
for i, v in game.ReplicatedStorage.PlayersCharacter:GetChildren() do
if v.Name == player.Name then
v:Destroy()
end
end
TeleportPlayerOnceTeamChoosen(player, player.Character)
player.Character:Clone().Parent = game.ReplicatedStorage.PlayersCharacter
end
end
end)
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.