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

Why doesn't this Transparency script work?

Asked by 10 years ago

I am trying to get it so that when the Player steps on the brick, it turns a different set of bricks invisible (transparency = 1)

here is the script

function onTouched()
    wait(0.5)
    script.Parent.Transparency = 0
end

script.Parent.Parent.Parent.Touched:connect(onTouched)

thanks

2 answers

Log in to vote
1
Answered by 10 years ago

It's because you are setting it to 0 in line 3, if you want it to be invisible then set transparency to 1.

0
Thank you so much, I was really tired, last night, I probably wouldn't have figured it out! Merry Christmas yogipanda123 120 — 10y
0
Thanks, merry Christmas to you as well. ^.^ Norshine 88 — 10y
Ad
Log in to vote
2
Answered by 10 years ago

Try This One.

local Part = Game.Workspace.Part

function onTouch(Part)
Part.Transparency = 1
wait(1)
Part.Transparency = 0

end
Part.Touched:connect(onTouch)
0
Just leave it out dont put it in the part Blitz12234 10 — 10y

Answer this question