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: I. Hate. Output. Please help

Previous Thread :: Next Thread 
Fydo is not online. Fydo
Joined: 12 Jul 2009
Total Posts: 5653
09 Aug 2011 10:18 AM
The output of course, yet again won't tell my why this won't work. Maybe one of you is smarter than the output :p

d = script.Parent
t = d.Transparency

function open()

d.CanCollide = false

while true do

t = t + .1
wait(.1)

if t == 1 then break

end
end
end

function close()

d.CanCollide = false

while true do

t = t - .1
wait(.1)

if t == 0 then break

end
end
end

function onClicked()

open()
wait(5)
close()

end

script.Parent.ClickDetector.MouseClick:connect(onClicked)
Report Abuse
VortexSecurityHub is not online. VortexSecurityHub
Joined: 03 Aug 2011
Total Posts: 37
09 Aug 2011 10:18 AM
So there's no output error AT ALL?
Report Abuse
Fydo is not online. Fydo
Joined: 12 Jul 2009
Total Posts: 5653
09 Aug 2011 10:20 AM
There was but I fixed them, now there's not, yet the script isn't working.
Report Abuse
VortexSecurityHub is not online. VortexSecurityHub
Joined: 03 Aug 2011
Total Posts: 37
09 Aug 2011 10:22 AM
What's the script supposed to do? :/
Report Abuse
ElectricBlaze is not online. ElectricBlaze
Joined: 18 Jul 2011
Total Posts: 22930
09 Aug 2011 10:23 AM
@Vortex - I think it's supposed to gradually increase and decrease the transparency of a part...

@OP - There's a much better way of doing this, you know. :/
Report Abuse
VortexSecurityHub is not online. VortexSecurityHub
Joined: 03 Aug 2011
Total Posts: 37
09 Aug 2011 10:26 AM
Eww. I see.


debounce = false

function open()
while script.Parent.Transparency < 1 do
script.Parent.Transparency = script.Parent.Transparency + 0.1
wait()
end
script.Parent.CanCollide = false
end

function close()
while script.Parent.Transparency > 0 do
script.Parent.Transparency = script.Parent.Transparency - 0.1
wait()
end
script.Parent.CanCollide = true
end

function onClicked()
if debounce then return else debounce = true end
open()
wait(5)
close()
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)
Report Abuse
VortexSecurityHub is not online. VortexSecurityHub
Joined: 03 Aug 2011
Total Posts: 37
09 Aug 2011 10:28 AM
I figured out why the original wasn't working.


When you do

t = d.Transparency

You are saving the current transparency of the door as a NUMBER.
You are not saving it as a path to the property, eg

Workspace.Model.Door.Transparency

When you were modifying the number, you were just modifying a number that had basically nothing to do with anything.
Report Abuse
Fydo is not online. Fydo
Joined: 12 Jul 2009
Total Posts: 5653
09 Aug 2011 10:29 AM
Oh ok. Thank you very much. I wish the output was that smart >.>
Report Abuse
EnzoDaVinci is not online. EnzoDaVinci
Joined: 14 Apr 2011
Total Posts: 3730
09 Aug 2011 10:52 AM
When the heck is with all the ends?
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