game.Players.LocalPlayer.CharacterAdded:connect(function()
local Head = game.Players.LocalPlayer.Character:WaitForChild("Head")
Head.BrickColor = BrickColor.new("New Yeller")
local LeftUpperArm = game.Players.LocalPlayer.Character:WaitForChild("LeftUpperArm")
LeftUpperArm:Destroy()
local RightUpperArm = game.Players.LocalPlayer.Character:WaitForChild("RightUpperArm")
RightUpperArm:Destroy()
local UpperTorso = game.Players.LocalPlayer.Character:WaitForChild("UpperTorso")
UpperTorso.BrickColor = BrickColor.new('New Yeller')
local LowerTorso = game.Players.LocalPlayer.Character:WaitForChild("LowerTorso")
LowerTorso.BrickColor = BrickColor.new('New Yeller')
local LeftUpperLeg = game.Players.LocalPlayer.Character:WaitForChild("LeftUpperLeg")
LeftUpperLeg.BrickColor = BrickColor.new('Bright yellow')
local LeftLowerLeg = game.Players.LocalPlayer.Character:WaitForChild("LeftLowerLeg")
LeftLowerLeg.BrickColor = BrickColor.new('Bright yellow')
local LeftFoot = game.Players.LocalPlayer.Character:WaitForChild("LeftFoot")
LeftFoot.BrickColor = BrickColor.new('Bright yellow')
local RightUpperLeg = game.Players.LocalPlayer.Character:WaitForChild("RightUpperLeg")
RightUpperLeg.BrickColor = BrickColor.new('Bright yellow')
local RightLowerLeg = game.Players.LocalPlayer.Character:WaitForChild("RightLowerLeg")
RightLowerLeg.BrickColor = BrickColor.new('Bright yellow')
local RightFoot = game.Players.LocalPlayer.Character:WaitForChild("RightFoot")
RightFoot.BrickColor = BrickColor.new('Bright yellow')
local plr = game.Players.LocalPlayer.Character
local humanoidplr = game.Players.LocalPlayer
for i, v in ipairs(plr:GetChildren()) do
if v:IsA("Accessory") then
v:Destroy()
end
end
for i, v in ipairs(plr:GetChildren()) do
if v:IsA("Shirt") then
v:Destroy()
end
end
for i, v in ipairs(plr:GetChildren()) do
if v:IsA("Pants") then
v:Destroy()
end
end
end)
This script was made for fun/testing. It edits a user's avatar upon joining the game, but I realized that other players in the server cannot see each other's avatar color changes. Is there a way to change this type of thing so that every player on the server can recognize the changes?
2 comments
fyi, the other guys answer works byt sending too many remote events can lag the game. to get the player use a game.Players.PlayerAdded event in a server script and you could just.. use a startercharacter? and in the plr:GetChildren() loops you could use ors/elseifs
Oh. Well, I now realize I could have used ors/elsifs, and a startercharacter is also an alternative. I'm mainly tinkering around with this, so thanks so much for these suggestions!