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 » Scripters
Home Search
 

Re: Why isn't this fade script working?

Previous Thread :: Next Thread 
FakeProfessor is not online. FakeProfessor
Joined: 27 Nov 2014
Total Posts: 5246
29 Nov 2015 03:41 AM
function Fade()
for i = 1,10 do
print "Fading in"
script.Parent.Menu.CONTROLS.BackgroundTransparency = i/10
end
end


script.Parent.Menu.List.Buttons.ControlsButton.MouseButton1Click:connect(function()
Fade()
end)


CONTROLS isn't visible, but it needs to fade in and become visible once "ControlsButton" is clicked.

Thanks for your help!
Report Abuse
powerhotmail123 is not online. powerhotmail123
Joined: 11 Apr 2011
Total Posts: 5041
29 Nov 2015 03:45 AM
local Menu = script.Parent:WaitForChild("Menu");

Menu.List.Buttons.ControlsButton.MouseButton1Click:connect(function()
for i = 1, 0, -0.1 do
print("Fading in.");
Menu.CONTROLS.BackgroundTransparency = i;
end
end)


I removed the function for the sake of efficiency. So, here is the function.

local function Fade()
for i = 1, 0, -0.1 do
print("Fading in.");
Menu.CONTROLS.BackgroundTransparency = i;
end
end

Enjoying your stay at the Scripters Forum? Join this! http://www.roblox.com/My/Groups.aspx?gid=2582784
Report Abuse
FakeProfessor is not online. FakeProfessor
Joined: 27 Nov 2014
Total Posts: 5246
29 Nov 2015 03:46 AM
It doesn't work. :/
Report Abuse
FakeProfessor is not online. FakeProfessor
Joined: 27 Nov 2014
Total Posts: 5246
29 Nov 2015 03:49 AM
1
Report Abuse
FakeProfessor is not online. FakeProfessor
Joined: 27 Nov 2014
Total Posts: 5246
29 Nov 2015 03:51 AM
2
Report Abuse
FakeProfessor is not online. FakeProfessor
Joined: 27 Nov 2014
Total Posts: 5246
29 Nov 2015 03:53 AM
3
Report Abuse
Ben1925 is not online. Ben1925
Joined: 07 Apr 2011
Total Posts: 741
29 Nov 2015 04:01 AM
Is the problem "It's appearing too quickly" ? or is it "It's not appearing at all?"

function Fade()
for i = 1,0,-0.1 do
print("Fading in")
wait(0.1)
script.Parent.Menu.CONTROLS.BackgroundTransparency = i
end
end

You reversed the for loop, it's causing it to increase transparency instead of decreasing it. You also need to wait, as WILL do the code here with no error, it's just that it'll do it way too fast for your eyes to see.
Report Abuse
Ben1925 is not online. Ben1925
Joined: 07 Apr 2011
Total Posts: 741
29 Nov 2015 04:02 AM
as Roblox WILL*
Report Abuse
FakeProfessor is not online. FakeProfessor
Joined: 27 Nov 2014
Total Posts: 5246
29 Nov 2015 04:05 AM
It's not appearing at all.
Report Abuse
FakeProfessor is not online. FakeProfessor
Joined: 27 Nov 2014
Total Posts: 5246
29 Nov 2015 04:08 AM
Still doesn't work. :/
Report Abuse
FakeProfessor is not online. FakeProfessor
Joined: 27 Nov 2014
Total Posts: 5246
29 Nov 2015 04:11 AM
*Sad violin music*
Report Abuse
FakeProfessor is not online. FakeProfessor
Joined: 27 Nov 2014
Total Posts: 5246
29 Nov 2015 04:14 AM
:(
Report Abuse
Ben1925 is not online. Ben1925
Joined: 07 Apr 2011
Total Posts: 741
29 Nov 2015 04:14 AM
Any error messages it returns? Maybe it's positioned off screen where you can't see it.
Report Abuse
FakeProfessor is not online. FakeProfessor
Joined: 27 Nov 2014
Total Posts: 5246
29 Nov 2015 04:14 AM
No errors.
Report Abuse
FakeProfessor is not online. FakeProfessor
Joined: 27 Nov 2014
Total Posts: 5246
29 Nov 2015 04:17 AM
So annoying. This is important.
Report Abuse
Ben1925 is not online. Ben1925
Joined: 07 Apr 2011
Total Posts: 741
29 Nov 2015 04:17 AM
Check it's size, position, anything that could be making it invisible for some reason. Maybe the Visible property is ticked off?
Report Abuse
FakeProfessor is not online. FakeProfessor
Joined: 27 Nov 2014
Total Posts: 5246
29 Nov 2015 04:18 AM
It is ticked off, yes.
Report Abuse
Ben1925 is not online. Ben1925
Joined: 07 Apr 2011
Total Posts: 741
29 Nov 2015 04:31 AM
Wait, so is it checked or not?
Report Abuse
FakeProfessor is not online. FakeProfessor
Joined: 27 Nov 2014
Total Posts: 5246
29 Nov 2015 04:50 AM
It is not visible.
Report Abuse
FakeProfessor is not online. FakeProfessor
Joined: 27 Nov 2014
Total Posts: 5246
29 Nov 2015 05:24 AM
@Ben - Thanks for your help, I'm going out now, I'll see if you have figured it out when I'm back.
Report Abuse
powerhotmail123 is not online. powerhotmail123
Joined: 11 Apr 2011
Total Posts: 5041
29 Nov 2015 05:56 AM
Oops, I forgot to put a wait(0.1) in.

Tell us these:

Transparency: 0 to 1
Visible: True or False
Size: UDim2
Position: UDim2

Enjoying your stay at the Scripters Forum? Join this! http://www.roblox.com/My/Groups.aspx?gid=2582784

Report Abuse
FakeProfessor is not online. FakeProfessor
Joined: 27 Nov 2014
Total Posts: 5246
29 Nov 2015 07:30 AM
Transparency = 0
Visible = False
Size = {0.3, 0},{0.5, 0}
Position = {0.5, 0},{0.2, 0}
Report Abuse
FakeProfessor is not online. FakeProfessor
Joined: 27 Nov 2014
Total Posts: 5246
29 Nov 2015 07:37 AM
4
Report Abuse
FakeProfessor is not online. FakeProfessor
Joined: 27 Nov 2014
Total Posts: 5246
29 Nov 2015 07:38 AM
5
Report Abuse
76km is not online. 76km
Joined: 14 Aug 2015
Total Posts: 5455
29 Nov 2015 07:39 AM
please stop this nonsense:

Fading a brick.

count = 0
max = 1
timer = 0.5
repeat
wait(timer)
count = count + 0.1
brick.Transparancy = count
until brick.Transparency = 1

solved

I'm an atheist priest
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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