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: Could someone fix this script, please?

Previous Thread :: Next Thread 
JamesBond96 is not online. JamesBond96
Joined: 05 Sep 2008
Total Posts: 572
09 Aug 2011 08:25 AM
So if I need onTouch the "Parent" brick..

Door, Door2, Door3, Door4, Door5 CanCollides = false..?

How to make that run correctly?

My version won't do it sadly.

So first I made the variables to make the thing easier, and than I made onTouch the parent all those doors have the same effect, but as for the results, only 1 random door had the effect!

Door = script.Parent.Parent.Door
Door2 = script.Parent.Parent.Door2
Door3 = script.Parent.Parent.Door3
Door4 = script.Parent.Parent.Door4
Door5 = script.Parent.Parent.Door5

function OnTouch(hit)
Door.Transparency = 0.5
Door.CanCollide = false
end

function OnTouch(hit)
Door2.Transparency = 0.5
Door2.CanCollide = false
end

function OnTouch(hit)
Door3.Transparency = 0.5
Door3.CanCollide = false
end

function OnTouch(hit)
Door4.Transparency = 0.5
Door4.CanCollide = false
end

function OnTouch(hit)
Door5.Transparency = 0.5
Door5.CanCollide = false
end


script.Parent.Touched:connect(OnTouch)
Report Abuse
JamesBond96 is not online. JamesBond96
Joined: 05 Sep 2008
Total Posts: 572
09 Aug 2011 08:28 AM
Bump :(
Report Abuse
Nartle is not online. Nartle
Joined: 29 Mar 2008
Total Posts: 7202
09 Aug 2011 08:28 AM
I'm not really good at scripting, but are you putting this in the workspace? >_>

I'm probably stupid at asking that, but if you aren't putting the script in the door, the only thing that makes me not confused would be doing, oh wait I'm still confused about your script, I'd have to make it in my map first >_>
Report Abuse
demonskul777 is not online. demonskul777
Joined: 28 May 2010
Total Posts: 3716
09 Aug 2011 08:29 AM
This way look at your last post of this script...
Report Abuse
proBLOXian12345 is not online. proBLOXian12345
Joined: 09 Apr 2011
Total Posts: 27
09 Aug 2011 10:41 AM
maybe there are so many doorws and so many of the same script on one script, maybe the game is confused, try making the door1, door2, door3 and so on on different scripts
Report Abuse
EnzoDaVinci is not online. EnzoDaVinci
Joined: 14 Apr 2011
Total Posts: 3730
09 Aug 2011 10:50 AM
function OnTouch(hit)
Door.Transparency = 0.5
Door.CanCollide = false
Door2.Transparency = 0.5
Door2.CanCollide = false
Door3.Transparency = 0.5
Door3.CanCollide = false
Door4.Transparency = 0.5
Door4.CanCollide = false
Door5.Transparency = 0.5
Door5.CanCollide = false
end
script.Parent.Touched:connect(onTouched)
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