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

Why isn't this script making the block become more visible?

Asked by 9 years ago

I have the block transparency set to 1. I have if you click it, the transparency decreases by 0.1, but that isn't working

here is the script i have (along with adjustments thanks to Adark)

function Click()
    script.Parent.Transparency = script.Parent.Transparency - 0.1

end

script.Parent.MouseButton1Down:connect(Click) 

Thanks! Merry Christmas! --P.S-- If you don't have anything to say that might help me, please don't say it at all (killerkill29), Thank you, Merry Christmas!

0
This is not a request site. You are obviously writing random crap, and making us 'fix it' and put your requests into it. Transparency '-0.1' does not exist. killerkill29 35 — 9y
2
I am SOOOOO sorry you find my request as "crap" and that there most likely is a way to subtract the current transparency by 0.1, Merry Christmas! XD yogipanda123 120 — 9y
1
@kill; lrn2script. Yogi obviously at least tried here. If you kindly read his question again, literally all we need to change is one single line of code to fix this. adark 5487 — 9y
0
Scripting Helpers does not allow requests, please remove this post. Muoshuu 580 — 9y
View all comments (3 more)
1
This literally isn't a request, what are all of you smoking? adark 5487 — 9y
1
^ Exaclty how can this be a request, just ban all them. A request is someone who puts up no code and says I want call of robloxia made for me. NinjoOnline 1146 — 9y
0
thank you!!! Way to say Merry Christmas ehh?!?!? yogipanda123 120 — 9y

2 answers

Log in to vote
1
Answered by
adark 5487 Badge of Merit Moderation Voter Community Moderator
9 years ago

You actually have to set the Transparency, not just subtract from it!

function Click()
    script.Parent.Transparency = script.Parent.Transparency - 0.1
end

script.Parent.MouseButton1Down:connect(Click) 
0
that didn't work, thanks though, and thanks for defending my "case" yogipanda123 120 — 9y
0
Could maybe using ElseIf work? yogipanda123 120 — 9y
0
just a thought yogipanda123 120 — 9y
Ad
Log in to vote
1
Answered by
duckyo01 120
9 years ago

You may want to put a click detector and put his

Brick = script.Parent
function(onClick)
Brick.Transparency  =  Brick.Transpareny 0.9
Brick.MouseButton1Down:connect(onClick)
0
oh well, that wasn't what i wanted, but it will have to do, thanks yogipanda123 120 — 9y

Answer this question