Hi, I'm trying to make it where when the player touches a certain part it will change the GUI's transparency but it didn't work.
local wall = workspace.wall local frame = script.Parent.Parent.FRAME if wall.Touched:Connect(onTouch) then frame.Visible = 0.5 end
What do i do?
Issue is frame.visible
visible
can only be set to true or false
So your going to need to go to the property tab under frame and look for background. and there should be something on the lines called BackgroundTransparency
you can use that in your script instead. (It may not be called backgroundtransparency so make sure you check in the properties tab. Hope this helps!! Also I am on my iPhone so I can't check right now, but if you need me to I can check later.
Here's a few things to try:
1. Try putting the event outside of an if then because they do not need them to work
2. Change visible to Transparency if you want to change the transparency.
Bonus: Once you have this problem figured out you could make the transparency fade to 0.5. Just an idea.
Please comment on this answer if you have any questions!