Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

My character appearance script isn't working?

Asked by
OhManXDXD 445 Moderation Voter
4 years ago

So I made a script that changed the character appearance, so depending on team, it would change your torso, and your other parts would have the same color. The script doesn't seem to work though.

supporter = game:GetService("Teams").Supporter
army = game:GetService("Teams").Army
royalg = game:GetService("Teams")["Royal Guard"]
royalty = game:GetService("Teams")["Royalty"]
burner = game:GetService("Teams")["Burner"]
picking = game:GetService("Teams")["Picking"]
outsider = game:GetService("Teams")["Outsider"]

game.Players.PlayerAdded:Connect(function(plr)
    char = plr.Character or plr.CharacterAdded:Wait()
    plr.CanLoadCharacterAppearance = false
    plr:ClearCharacterAppearance()
    local rightarm = char:FindFirstChild("Right Arm")
    local leftarm = char:FindFirstChild("Left Arm")
    local rightleg = char:FindFirstChild("Right Leg")
    local leftleg = char:FindFirstChild("Left Leg")
    local torso = char:FindFirstChild("Torso")



    rightarm.BrickColor = BrickColor.new("Ghost grey")
    leftarm.BrickColor = BrickColor.new("Ghost grey")
    rightleg.BrickColor = BrickColor.new("Ghost grey")
    leftleg.BrickColor = BrickColor.new("Ghost grey")

    plr.Team.Changed:Connect(function()
        if plr.Team == army then
            torso.BrickColor = BrickColor.new("Cyan")
        elseif plr.Team == royalg then
            torso.BrickColor = BrickColor.new("Black")
        elseif plr.Team == royalty then
            torso.BrickColor = BrickColor.new("Gold")
        elseif plr.Team == outsider then
            torso.BrickColor = BrickColor.new("Smoky grey")
        elseif plr.Team == burner then
            torso.BrickColor = BrickColor.new("Really red")
        elseif plr.Team == supporter then
            torso.BrickColor = BrickColor.new("Terra Cotta")
        --elseif plr.Team == picking then
        end
    end)
    end)

0
Anything in the output? MmadProgrammer 35 — 4y
0
Nope. Nothing in Client or Server. OhManXDXD 445 — 4y
0
I'm assuming you're using a script and not a localscript? And also that you're using an R6 rig? robloxianmirror 57 — 4y
0
Yes and Yes OhManXDXD 445 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

Hi OhManLolLol.

From my observation, this is possibly a simple mistake.

While I'm not definite, I think you forgot a few "local"'s.

Try replacing the top bit of your script with this and get back to me:

local supporter = game:GetService("Teams").Supporter
local army = game:GetService("Teams").Army
local royalg = game:GetService("Teams")["Royal Guard"]
local royalty = game:GetService("Teams")["Royalty"]
local burner = game:GetService("Teams")["Burner"]
local picking = game:GetService("Teams")["Picking"]
local outsider = game:GetService("Teams")["Outsider"]
0
Nothing changed. OhManXDXD 445 — 4y
Ad

Answer this question