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: can anyone figure out why this isn't working

Previous Thread :: Next Thread 
l3oot is not online. l3oot
Joined: 10 Oct 2015
Total Posts: 2821
25 Aug 2017 11:13 AM
function onClicked()
script.Parent.Parent.Gate.Transparency = 1
script.Parent.Parent.Gate.CanCollide = false
script.Parent.Parent.sides.Transparency = 0
script.Parent.Parent.sides.CanCollide = true
wait(.001)
end

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



it's a free model gate but i copied the 4th and 5th lines of code to add a cooler effect to the gate being opened but now the buttons just don't work

both Gate and sides are a union (it worked fine before i added the two lines)


Report Abuse
Luminak is not online. Luminak
Joined: 27 May 2012
Total Posts: 2809
25 Aug 2017 11:17 AM
is there a clickdetector in the block

what does output say


Report Abuse
Ajastra is not online. Ajastra
Joined: 01 Aug 2017
Total Posts: 1461
25 Aug 2017 11:17 AM
You can only wait for a minimum of about 1/30 seconds with wait() (and it will almost always be slightly more), so waiting for 0.001 seconds is redundant.

Check your output to see if there's any problems with your code. Is your capitalization correct and is everything where it should be?


Report Abuse
gadarol_nice is not online. gadarol_nice
Joined: 17 Jun 2016
Total Posts: 20
25 Aug 2017 04:39 PM
function ########### script.Parent.Parent.Gate.Transparency = # script.Parent.Parent.Gate.CanCollide = false wait(1) script.Parent.Parent.sides.Transparency = # script.Parent.Parent.sides.CanCollide = true wait(.001) end ######################################################### Now ist working before it opens the door and in the same Moment it Closes now the Door or gate is open for a ###### just Change it the longer you want.
Report Abuse
gadarol_nice is not online. gadarol_nice
Joined: 17 Jun 2016
Total Posts: 20
25 Aug 2017 04:47 PM
LOL at Preview it wasnt looking like that! But put wait(time the door is open) between
script.Parent.Parent.Gate.CanCollide = false
script.Parent.Parent.sides.Transparency = #
Report Abuse
gadarol_nice is not online. gadarol_nice
Joined: 17 Jun 2016
Total Posts: 20
25 Aug 2017 04:50 PM
When you use it like this than the door opens and Closes at the same Moment.
Report Abuse
l3oot is not online. l3oot
Joined: 10 Oct 2015
Total Posts: 2821
26 Aug 2017 11:31 AM
ok so what i'm going for is like an 'animated' door without the physical animation of the gate opening

gate is the closed form

sides is the open form

i want gate to go invisible and collidable when sides goes visible and non-collidable and then vice versa when it closes




Report Abuse
l3oot is not online. l3oot
Joined: 10 Oct 2015
Total Posts: 2821
26 Aug 2017 11:42 AM
"Check your output to see if there's any problems with your code. Is your capitalization correct and is everything where it should be?"

wow this is embarrassing... so when i built the gate, i modeled the parts side and Gate and put the model inside of the entire gate model so when it was looking for Gate and sides in Parent.Parent it couldn't find it because they were inside the model....


Report Abuse
l3aited is not online. l3aited
Joined: 19 Dec 2016
Total Posts: 8176
26 Aug 2017 12:03 PM
Should be


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