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

How do I change the transparency of the character?

Asked by 4 years ago

The script below is a clothing server script. I am trying to make a part inside of the arms of character visible but it does not work. How can I fix this?



game.ReplicatedStorage.Events.ShirtEvent1.OnServerEvent:Connect(function(plr) local char = plr.Character local Button = game.StarterGui.Clothing.Shirts.BlackShirt local q = BrickColor.new("Really black") char["UpperTorso"].BrickColor = q char["LeftUpperArm"].LeftUpperSleeve.BrickColor = q char["LeftLowerArm"].LeftLowerSleeve.BrickColor = q char["RightLowerArm"].RightLowerSleeve.BrickColor = q char["RightUpperArm"].RightUpperSleeve.BrickColor = q ----------------------- char["LeftUpperArm"].LeftUpperSleeve.Opacity = 1 char["LeftLowerArm"].LeftLowerSleeve.Opacity = 1 char["RightLowerArm"].RightLowerSleeve.Opacity = 1 char["RightUpperArm"].RightUpperSleeve.Opacity = 1 char.LowerTorso.BrickColor = q end)
0
Transparency, not Opacity DeceptiveCaster 3761 — 4y
0
There is nothing called "Opacity" in any property. It's called Transparency. You can set it from 0, to 1. 1 means invisible, 0 means visible. 0.5 means half opacity. Techyfied 114 — 4y
0
I tried opacity because i thought i saw someone use opacity, I tried using transparency and it still did not work jonny377 4 — 4y

2 answers

Log in to vote
0
Answered by 4 years ago

Your issue is that you are attempting to change a property called "Opacity", which does not exist. The property that you're looking for is called Transparency, which is scaled from 0 to 1 (0 being fully visible, 1 being completely invisible.

Assuming the rest of your code is fine, then...

game.ReplicatedStorage.Events.ShirtEvent1.OnServerEvent:Connect(function(plr)

    local char = plr.Character
    local Button = game.StarterGui.Clothing.Shirts.BlackShirt
    local q = BrickColor.new("Really black")

    char["UpperTorso"].BrickColor = q
    char["LeftUpperArm"].LeftUpperSleeve.BrickColor = q
    char["LeftLowerArm"].LeftLowerSleeve.BrickColor = q
    char["RightLowerArm"].RightLowerSleeve.BrickColor = q
    char["RightUpperArm"].RightUpperSleeve.BrickColor = q
    -----------------------
    char["LeftUpperArm"].LeftUpperSleeve.Transparency = 1
    char["LeftLowerArm"].LeftLowerSleeve.Transparency = 1
    char["RightLowerArm"].RightLowerSleeve.Transparency = 1
    char["RightUpperArm"].RightUpperSleeve.Transparency = 1
    char.LowerTorso.BrickColor = q

end)
Ad
Log in to vote
0
Answered by 4 years ago

My mistake was i thought the character I had in workspace had sleeve parts welded to the arms.

Answer this question