This was written on a local script, but the server doesn't recognize this for all players in-game to see what it does. How can this be changed so it can work and be written in a server script, and is a RemoteEvent an absolutely necessary thing to use for this?
game.Players.LocalPlayer.CharacterAdded:connect(function()
-- Head Color
local Head = game.Players.LocalPlayer.Character:WaitForChild("Head")
Head.BrickColor = BrickColor.new("New Yeller")
-- Arms Destroyed
local LeftUpperArm = game.Players.LocalPlayer.Character:WaitForChild("LeftUpperArm")
LeftUpperArm:Destroy()
local RightUpperArm = game.Players.LocalPlayer.Character:WaitForChild("RightUpperArm")
RightUpperArm:Destroy()
-- Sapling Limb Colors Set
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')
-- Group Values Destroyed
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)
What this is doing: Editing a user's avatar upon them joining the game.
