Ad
Log in to vote
0

Players in the server cannot see each other's edited avatars?

Asked by 14 days ago
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()
    --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')
    -- 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)
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?
0
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 0hsa 119 — 14d
1
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! StirSavvy 38 — 14d

1 answer

Log in to vote
0
Answered by
NotedAPI 809 Moderation Voter
14 days ago

You're using a LocalScript to make the changes to their avatar, which isn't going to replicate it to the server. Use a RemoteEvent or Normal Script.

Ad

Answer this question