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: Why won't this work?

Previous Thread :: Next Thread 
TameDrone is not online. TameDrone
Joined: 09 Dec 2010
Total Posts: 1006
07 Dec 2011 06:28 PM
local Door = game.Workspace.Door

function onTouch()

Door.Transparency = 0
wait()
Door.Transparency = 0.1
wait()
Door.Transparency = 0.2
wait()
Door.Transparency = 0.3
wait()
Door.Transparency = 0.4
wait()
Door.Transparency = 0.5
wait()

Door.CanCollide = false
wait(3)

Door.Transparency = 0.5
wait()
Door.Transparency = 0.4
wait()
Door.Transparency = 0.3
wait()
Door.Transparency = 0.2
wait()
Door.Transparency = 0.1
wait()
Door.Transparency = 0

Door.CanCollide = true

end
Door.Touched:connect(onTouch)
Report Abuse
TameDrone is not online. TameDrone
Joined: 09 Dec 2010
Total Posts: 1006
07 Dec 2011 06:31 PM
Suggestions?
Report Abuse
TwoBoo is not online. TwoBoo
Joined: 08 Feb 2011
Total Posts: 10790
07 Dec 2011 06:39 PM
local Door = game.Workspace.Door

function onTouch(hit)
hum = script.Parent:findFirstChild(hit.Parent)
if hum ~= nil then
for i = 1,5 do
wait()
Door.Transparency = Door.Transparency + 0.1
end
d.CanCollide = false
wait(3)
for i = 1,5 do
wait()
Door.Transparency = Door.Transparency - 0.1
end
d.CanCollide = true
end
end
Door.Touched:connect(onTouch)
Report Abuse
TwoBoo is not online. TwoBoo
Joined: 08 Feb 2011
Total Posts: 10790
07 Dec 2011 06:40 PM
Typo;

local Door = game.Workspace.Door

function onTouch(hit)
hum = script.Parent:findFirstChild(hit.Parent)
if hum ~= nil then
for i = 1,5 do
wait()
Door.Transparency = Door.Transparency + 0.1
end
Door.CanCollide = false
wait(3)
for i = 1,5 do
wait()
Door.Transparency = Door.Transparency - 0.1
end
Door.CanCollide = true
end
end
Door.Touched:connect(onTouch)
Report Abuse
TameDrone is not online. TameDrone
Joined: 09 Dec 2010
Total Posts: 1006
07 Dec 2011 06:42 PM
Thanks bro
Report Abuse
TwoBoo is not online. TwoBoo
Joined: 08 Feb 2011
Total Posts: 10790
07 Dec 2011 06:45 PM
Np.
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