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

Why wont my script make my legs Transparency Equal 1?

Asked by
NexeusX 137
8 years ago
Edited 8 years ago

This script only works on my Left Leg, but not my Right Leg won't turn invisible, did i spell something wrong?

01script.Parent.Touched:connect(function(hit)
02    if hit.Parent.Humanoid then
03        --Character Body Parts
04        LeftUpperLeg = hit.Parent.LeftUpperLeg
05        LeftLowerLeg = hit.Parent.LeftLowerLeg
06        LeftFoot = hit.Parent.LeftFoot
07 
08        RightUpperLeg = hit.Parent.LeftUpperLeg
09        RightLowerLeg = hit.Parent.LeftLowerLeg
10        RightFoot = hit.Parent.RightFoot
11 
12            LeftUpperLeg.Transparency = 1
13            LeftLowerLeg.Transparency = 1
14            LeftFoot.Transparency = 1
15 
View all 25 lines...

1 answer

Log in to vote
1
Answered by 8 years ago
Edited 8 years ago

I'm 80 percent sure that this is your problem

1RightUpperLeg = hit.Parent.LeftUpperLeg
2 
3RightLowerLeg = hit.Parent.LeftLowerLeg
4 
5RightFoot = hit.Parent.RightFoot

Here is the problem

RightUpperLeg should equal hit.Parent.RightUpperLeg instead of LeftUpperLeg and RightLowerLeg shoud equal hit.Parent.RightLowerLeg instead of LeftLowerLeg

Your Right Upper and Right Lower are equal to Left Upper and Left Lower.

The transparency for your LeftUpper and LeftLower are the only changing results because there is nothing here that changes the transparency for your RightLowerLeg and RightUpperLeg

RightUpperLeg should be equal to RightUpperLeg

and

RightLowerLeg should be equal to RightLowerLeg

Your script should look like this

script.Parent.Touched:connect(function(hit)

01if hit.Parent.Humanoid then
02 
03    --Character Body Parts
04 
05    LeftUpperLeg = hit.Parent.LeftUpperLeg
06 
07    LeftLowerLeg = hit.Parent.LeftLowerLeg
08 
09    LeftFoot = hit.Parent.LeftFoot
10 
11 
12 
13    RightUpperLeg = hit.Parent.RightUpperLeg
14 
15    RightLowerLeg = hit.Parent.RightLowerLeg
View all 33 lines...

end

end)

0
Ah ok i see, i made an mistake that overlooked thanks! NexeusX 137 — 8y
0
Did that help? dakanji123 97 — 8y
Ad

Answer this question