generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: GUI Scripts

Previous Thread :: Next Thread 
IceOrb is not online. IceOrb
Joined: 02 May 2010
Total Posts: 1206
03 Apr 2013 11:36 AM
Hi there, what's the simpler way to reduce / increase the transparency of a Frame within a ScreenGui, instead of having to type:

ScreenGui.Frame.BackgroundTransparency = 1
wait()
ScreenGui.Frame.BackgroundTransparency = 0.9

etc etc..
Report Abuse
IceOrb is not online. IceOrb
Joined: 02 May 2010
Total Posts: 1206
03 Apr 2013 11:54 AM
Bump
Report Abuse
IceOrb is not online. IceOrb
Joined: 02 May 2010
Total Posts: 1206
03 Apr 2013 11:56 AM
Does anyone know how to do it? I'm sure there is an easier way instead of having to type this:

script.Parent.Parent.Parent.Fade2.BackgroundTransparency = 1
wait()
script.Parent.Parent.Parent.Fade2.BackgroundTransparency = 0.9
wait()
script.Parent.Parent.Parent.Fade2.BackgroundTransparency = 0.8
wait()
etc etc.
Report Abuse
1WOOF1 is not online. 1WOOF1
Joined: 03 May 2009
Total Posts: 20682
03 Apr 2013 12:01 PM
[ Content Deleted ]
Report Abuse
IceOrb is not online. IceOrb
Joined: 02 May 2010
Total Posts: 1206
03 Apr 2013 12:03 PM
Could I have an example?
would I have to do something like
for i 1,10 do
script.Parent.Parent.Parent.Fade2.BackgroundTransparency = i -0.1
Report Abuse
1WOOF1 is not online. 1WOOF1
Joined: 03 May 2009
Total Posts: 20682
03 Apr 2013 12:04 PM
[ Content Deleted ]
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
03 Apr 2013 12:04 PM
for i = 0, 1, 0.1
repeat
FindPart.BackgroundTransparency = 1 - i
until
FindPart.BackgroundTransparency = 0
end
Report Abuse
IceOrb is not online. IceOrb
Joined: 02 May 2010
Total Posts: 1206
03 Apr 2013 12:06 PM
Well, I wanted it to minus 0.1 from the transparency so it returns back to 0, the transparency is set to 1, so minus 0.1 each time e.g. 1, 0.9, 0.8 etc.
Report Abuse
IceOrb is not online. IceOrb
Joined: 02 May 2010
Total Posts: 1206
03 Apr 2013 12:14 PM
Is this correct?

function onClick()
for i=1,10 do
script.Parent.Parent.BackgroundTransparency = i *0.1
end
end
script.Parent.MouseButton1Click:connect(onClick)
Report Abuse
1WOOF1 is not online. 1WOOF1
Joined: 03 May 2009
Total Posts: 20682
03 Apr 2013 12:14 PM
[ Content Deleted ]
Report Abuse
IceOrb is not online. IceOrb
Joined: 02 May 2010
Total Posts: 1206
03 Apr 2013 12:16 PM
Your not much help are you...
how would I make it reduce transparency to 0
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
03 Apr 2013 12:18 PM
Try the script I said a few posts ago?

Soup's on, everybody!
Report Abuse
IceOrb is not online. IceOrb
Joined: 02 May 2010
Total Posts: 1206
03 Apr 2013 12:20 PM
What this:

function onClick()
for i = 0, 1, 0.1
repeat
FindPart.BackgroundTransparency = 1 - i
until
FindPart.BackgroundTransparency = 0
end
script.Parent.MouseButton1Click:connect(onClick)
Report Abuse
IceOrb is not online. IceOrb
Joined: 02 May 2010
Total Posts: 1206
03 Apr 2013 12:22 PM
Wait, that script is missing a "do"

I'll test this though

function onClick()
for i = 0, 1, 0.1 do
repeat
FindPart.BackgroundTransparency = 1 - i
until
FindPart.BackgroundTransparency = 0
end
script.Parent.MouseButton1Click:connect(onClick)
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
03 Apr 2013 12:22 PM
Yes.
Report Abuse
IceOrb is not online. IceOrb
Joined: 02 May 2010
Total Posts: 1206
03 Apr 2013 12:23 PM
Nope, still don't work.
What is the "FindPart"
Report Abuse
IceOrb is not online. IceOrb
Joined: 02 May 2010
Total Posts: 1206
03 Apr 2013 12:24 PM
Ah, I'll just do it the long way ha.
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
03 Apr 2013 12:25 PM
Put the path to the GUI, for example script.Parent.Parent.Frame.TextButton
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
03 Apr 2013 12:28 PM
function onClick()
for i = 0, 1, 0.1 do
repeat
script.Parent.Parent.Fade2.BackgroundTransparency = 1 - i
until
script.Parent.Parent.Fade2.BackgroundTransparency = 0
end
end
end
Report Abuse
IceOrb is not online. IceOrb
Joined: 02 May 2010
Total Posts: 1206
03 Apr 2013 12:38 PM
18:38:08.798 - Players.Player1.PlayerGui.ScreenGui.Frame.TextButton.Script:6: unexpected symbol near '='
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
03 Apr 2013 12:41 PM
Change the = on line 6 to ==
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
03 Apr 2013 12:44 PM
function onClick()
for i = 0, 1, 0.1 do
repeat
script.Parent.Parent.Fade2.BackgroundTransparency = 1 - i
until
script.Parent.Parent.Fade2.BackgroundTransparency == 0
end
end

script.Parent.MouseButton1Click:connect(onClick)
Report Abuse
digpoe is not online. digpoe
Joined: 02 Nov 2008
Total Posts: 9092
03 Apr 2013 12:45 PM
:l

No.

for i = 1, 0, -0.1 do
script.Parent.Parent.Fade2.BackgroundTransparency = i
end
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image