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

The text button text won't become visible then transparent. Any solutions?

Asked by 4 years ago

I'm making a system where when you touch a part, it senses your inventory. This part all works fine. But I made a button, and when you click that, the text button (which has inventory items) text won't become visible. I set it to transparency one, and made a script that goes like this:

function OnClicked(C)
    local Screen = script.Parent.Parent.Screen.Example.TextTransperancy
Screen.Transperancy = 0
wait(5)
Screen.Transperancy = 1
end
script.Parent.ClickDetector.MouseClick:connect(OnClicked)

Any solutions/fixes that can be made?

2 answers

Log in to vote
0
Answered by
Raccoonyz 1092 Donator Moderation Voter
4 years ago

The answer is grammar. The reason it won't work is because you are changing a value called Transperancy. The actual name is Transparency.

0
lmaoooooooooooooooooooooooooo greatneil80 2647 — 4y
0
brings back an old memory of when I spent half an hour trying to make a part invisible in front of my friend but it didn't work because I spelled it as Transperancy greatneil80 2647 — 4y
0
lmaoooooooooooooooooooooooooo qVoided 221 — 4y
Ad
Log in to vote
0
Answered by
DrShockz 233 Moderation Voter
4 years ago

You have misspelled the word "Transparency"

function OnClicked(C)
    local Screen = script.Parent.Parent.Screen.Example.TextTransperancy
Screen.Transparency = 0
wait(5)
Screen.Transparency = 1
end
script.Parent.ClickDetector.MouseClick:connect(OnClicked)

Next time try using the TAB key to auto-complete your code.

Answer this question