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: Need aid on fading window please help.

Previous Thread :: Next Thread 
BadAttacker14 is not online. BadAttacker14
Joined: 12 Feb 2010
Total Posts: 275
12 Jun 2013 07:30 PM
is this correct.

function OnClick()

script.Parent.Parent.Door.Transparency = 0
wait(0.2)
script.Parent.Parent.Door.Transparency = 0.1
wait(0.2)
script.Parent.Parent.Door.Transparency = 0.2
wait(0.2)
script.Parent.Parent.Door.Transparency = 0.3
wait(0.2)
script.Parent.Parent.Door.Transparency = 0.4
wait(0.2)
script.Parent.Parent.Door.Transparency = 0.5
wait(0.2)
script.Parent.Parent.Door.Transparency = 0.6
wait(0.2)
script.Parent.Parent.Door.Transparency = 0.7
wait(0.2)
script.Parent.Parent.Door.Transparency = 0.8

function OnClick() - - So it can fade back to normal

script.Parent.Parent.Door.Transparency = 0.7
wait(0.2)
- - and goes on into Transparency = 1 and end

Is it correct or am I missing something because it is failing

Report Abuse
Maradar is not online. Maradar
Joined: 06 Mar 2012
Total Posts: 4478
12 Jun 2013 07:33 PM
Does the door have a object in it that it requires 2 parents? If not, just remove the extra parents.
Report Abuse
BadAttacker14 is not online. BadAttacker14
Joined: 12 Feb 2010
Total Posts: 275
12 Jun 2013 07:36 PM
Ok thank you, but the 1st order it works but when I want to click it a second time so it can close it doesn't.
Report Abuse
Maradar is not online. Maradar
Joined: 06 Mar 2012
Total Posts: 4478
12 Jun 2013 07:39 PM
script.Parent.Parent.Door.Transparency = 0 instead of script.Parent.Parent.Door.Transparency = 0.7
Report Abuse
keehl257 is not online. keehl257
Joined: 12 May 2013
Total Posts: 122
12 Jun 2013 07:58 PM
:3 why two functions for On Click() ?
Report Abuse
BadAttacker14 is not online. BadAttacker14
Joined: 12 Feb 2010
Total Posts: 275
13 Jun 2013 08:24 AM
Well im not one of the best scripter im kind of new so.
Report Abuse
sam8985 is not online. sam8985
Joined: 12 Nov 2011
Total Posts: 582
13 Jun 2013 08:41 AM
local door = script.Parent.Door --or wherever your door is
local faded = false
function OnClick()
if faded == false then
for i = 0, 1, 0.1 do
wait(.1)
door.Transparency = i
end
faded = true
end
elseif faded then
for i = 1, 0, -0.1 do
wait(.1)
door.Transparency = i
end
faded = false
end
door.ClickDetector.MouseClick:connect(OnClick)
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