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 » Club Houses » ROBLOX Talk
Home Search
 

Re: linux

Previous Thread :: Next Thread 
ForeignLOL is not online. ForeignLOL
Joined: 15 Jul 2011
Total Posts: 735
16 Nov 2012 05:48 PM
if Door.Transparency == 1 then
Door.CanCollide = false
end
Report Abuse
Oozlebachr is not online. Oozlebachr
Joined: 30 Aug 2009
Total Posts: 22223
16 Nov 2012 05:49 PM
i haven't worked with scripts since summertime but i don't see why that wouldn't work
what's the full script?
Report Abuse
ForeignLOL is not online. ForeignLOL
Joined: 15 Jul 2011
Total Posts: 735
16 Nov 2012 05:50 PM
local Door = script.Parent.Parent.Door1

function onClicked()

while Door.Transparency ~= 1 do
Door.Transparency = Door.Transparency + 0.1
wait(0.1)
if Door.Transparency == 1 then
Door.CanCollide = false
end
end
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)

SINCERELY - WANNABE TROLL
Report Abuse
omahopah is not online. omahopah
Joined: 26 Jan 2011
Total Posts: 5760
16 Nov 2012 05:51 PM
wrong forum
Report Abuse
Oozlebachr is not online. Oozlebachr
Joined: 30 Aug 2009
Total Posts: 22223
16 Nov 2012 05:51 PM
try this

local Door = script.Parent.Parent.Door1

function onClicked()
while Door.Transparency ~= 1 do
Door.Transparency = Door.Transparency + 0.1
wait(0.1)
end
Door.CanCollide = false
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)
Report Abuse
ForeignLOL is not online. ForeignLOL
Joined: 15 Jul 2011
Total Posts: 735
16 Nov 2012 05:51 PM
lolinodatdeyjustwontreplykaibcztheythinkimdonebutithinkifoundholeinscriptingonrobloxkai

SINCERELY - WANNABE TROLL
Report Abuse
Oozlebachr is not online. Oozlebachr
Joined: 30 Aug 2009
Total Posts: 22223
16 Nov 2012 05:54 PM
oh, and if you need an explanation:

the Door.Transparency == 1 line was within the while Door.Transparency ~= 1 block
so, if the door transparency was one then the script would skip that entire block and not follow through to the Door.Transparency == 1 line
Report Abuse
ForeignLOL is not online. ForeignLOL
Joined: 15 Jul 2011
Total Posts: 735
16 Nov 2012 05:55 PM
I tried that too, it still doesn't work. :L
I hope ROBLOX hasn't broken something...

SINCERELY - WANNABE TROLL
Report Abuse
ForeignLOL is not online. ForeignLOL
Joined: 15 Jul 2011
Total Posts: 735
16 Nov 2012 05:57 PM
Gragh, stuff it. Obviously ROBLOX broke something.
I'm going to go play Arma 2.

SINCERELY - WANNABE TROLL
Report Abuse
Oozlebachr is not online. Oozlebachr
Joined: 30 Aug 2009
Total Posts: 22223
16 Nov 2012 05:57 PM
um
what about



local Door = script.Parent.Parent.Door1

function onClicked()
for i=1,10 do
Door.Transparency = Door.Transparency + 0.1
wait(0.1)
end
Door.CanCollide = false
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)



sorry if that doesn't work either
try removing the 'local' before 'Door' on the first line or something
sorry if i'm not helping out much, i haven't really worked with scripts since summertime like i said earlier :(
Report Abuse
Oozlebachr is not online. Oozlebachr
Joined: 30 Aug 2009
Total Posts: 22223
16 Nov 2012 05:57 PM
okay, have fun :)
sorry i couldnt help
Report Abuse
ForeignLOL is not online. ForeignLOL
Joined: 15 Jul 2011
Total Posts: 735
16 Nov 2012 06:00 PM
You've provided more help for me than scripting helpers did...
Well, it worked. :D
Thanks.
I just wonder what the problem was with the original script...

SINCERELY - WANNABE TROLL
Report Abuse
Oozlebachr is not online. Oozlebachr
Joined: 30 Aug 2009
Total Posts: 22223
16 Nov 2012 06:02 PM
ah, you're welcome :)

"I just wonder what the problem was with the original script..."

it helps to indent every block so you can easily spot out conflicts, like so:


local Door = script.Parent.Parent.Door1

function onClicked()

while Door.Transparency ~= 1 do
Door.Transparency = Door.Transparency + 0.1
wait(0.1)
if Door.Transparency == 1 then
Door.CanCollide = false
end
end
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)


as you can see, line 8 is within line 5's block
the script will see that the door's transparency is one and skip over line 5's entire block, which ends at line 11
the script will never get to line 8 no matter what :P
Report Abuse
Oozlebachr is not online. Oozlebachr
Joined: 30 Aug 2009
Total Posts: 22223
16 Nov 2012 06:03 PM
err
i forgot that the forum reformats replies so that spaces at the beginning of lines aren't seen, sorry about that
the idea is to either put one of those tab characters or a space at the beginning of every line, like this
(pretend the underscores are spaces)

local Door = script.Parent.Parent.Door1

function onClicked()
_
_while Door.Transparency ~= 1 do
_Door.Transparency = Door.Transparency + 0.1
_wait(0.1)
__if Door.Transparency == 1 then
__Door.CanCollide = false
__end
_end
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)
Report Abuse
ForeignLOL is not online. ForeignLOL
Joined: 15 Jul 2011
Total Posts: 735
16 Nov 2012 06:07 PM
I see, thanks. One step closer to my Jurassic Park game/scenario.

SINCERELY - WANNABE TROLL
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Club Houses » ROBLOX Talk
   
 
   
  • 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