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: Help with simple script

Previous Thread :: Next Thread 
AgentBooth57 is not online. AgentBooth57
Joined: 26 Jun 2009
Total Posts: 274
30 Jul 2011 06:24 PM
What I have is a model called model, in it is Gate1,Gate2,and Entrance. Entrance is a stack of blocks, from bottom to top named part1-12. Gate1 and 2 have in them Path1 and Path2. They each have a script called Script. Heres the script in 1, they have opposite names in the two paths. Path1 has this script, path 2 has the same script, but where it says path2, it says path 1.




function onTouched()

script.Parent.Parent.Parent.Gate2.Path2.Script.Disabled = true
script.Parent.Parent.Parent.Entrance.Part1.Transparency = 1
script.Parent.Parent.Parent.Entrance.Part1.CanCollide = false
wait(.08)
script.Parent.Parent.Parent.Entrance.Part2.Transparency = 1
script.Parent.Parent.Parent.Entrance.Part2.CanCollide = false
wait(.08)
script.Parent.Parent.Parent.Entrance.Part3.Transparency = 1
script.Parent.Parent.Parent.Entrance.Part3.CanCollide = false
wait(.08)
script.Parent.Parent.Parent.Entrance.Part4.Transparency = 1
script.Parent.Parent.Parent.Entrance.Part4.CanCollide = false
wait(.08)
script.Parent.Parent.Parent.Entrance.Part5.Transparency = 1
script.Parent.Parent.Parent.Entrance.Part5.CanCollide = false
wait(.08)
script.Parent.Parent.Parent.Entrance.Part6.Transparency = 1
script.Parent.Parent.Parent.Entrance.Part6.CanCollide = false
wait(.08)
script.Parent.Parent.Parent.Entrance.Part7.Transparency = 1
script.Parent.Parent.Parent.Entrance.Part7.CanCollide = false
wait(.08)
script.Parent.Parent.Parent.Entrance.Part8.Transparency = 1
script.Parent.Parent.Parent.Entrance.Part8.CanCollide = false
wait(.08)
script.Parent.Parent.Parent.Entrance.Part9.Transparency = 1
script.Parent.Parent.Parent.Entrance.Part9.CanCollide = false
wait(.08)
script.Parent.Parent.Parent.Entrance.Part10.Transparency = 1
script.Parent.Parent.Parent.Entrance.Part10.CanCollide = false
wait(.08)
script.Parent.Parent.Parent.Entrance.Part11.Transparency = 1
script.Parent.Parent.Parent.Entrance.Part11.CanCollide = false
wait(.08)
script.Parent.Parent.Parent.Entrance.Part12.Transparency = 1
script.Parent.Parent.Parent.Entrance.Part12.CanCollide = false
wait(1.5)
script.Parent.Parent.Parent.Entrance.Part12.Transparency = 0
script.Parent.Parent.Parent.Entrance.Part12.CanCollide = true
wait(.8)
script.Parent.Parent.Parent.Entrance.Part11.Transparency = 0
script.Parent.Parent.Parent.Entrance.Part11.CanCollide = true
wait(.8)
script.Parent.Parent.Parent.Entrance.Part10.Transparency = 0
script.Parent.Parent.Parent.Entrance.Part10.CanCollide = true
wait(.8)
script.Parent.Parent.Parent.Entrance.Part9.Transparency = 0
script.Parent.Parent.Parent.Entrance.Part9.CanCollide = true
wait(.8)
script.Parent.Parent.Parent.Entrance.Part8.Transparency = 0
script.Parent.Parent.Parent.Entrance.Part8.CanCollide = true
wait(.8)
script.Parent.Parent.Parent.Entrance.Part7.Transparency = 0
script.Parent.Parent.Parent.Entrance.Part7.CanCollide = true
wait(.8)
script.Parent.Parent.Parent.Entrance.Part6.Transparency = 0
script.Parent.Parent.Parent.Entrance.Part6.CanCollide = true
wait(.8)
script.Parent.Parent.Parent.Entrance.Part5.Transparency = 0
script.Parent.Parent.Parent.Entrance.Part5.CanCollide = true
wait(.8)
script.Parent.Parent.Parent.Entrance.Part4.Transparency = 0
script.Parent.Parent.Parent.Entrance.Part4.CanCollide = true
wait(.8)
script.Parent.Parent.Parent.Entrance.Part3.Transparency = 0
script.Parent.Parent.Parent.Entrance.Part3.CanCollide = true
wait(.8)
script.Parent.Parent.Parent.Entrance.Part2.Transparency = 0
script.Parent.Parent.Parent.Entrance.Part2.CanCollide = true
wait(.8)
script.Parent.Parent.Parent.Entrance.Part1.Transparency = 0
script.Parent.Parent.Parent.Entrance.Part1.CanCollide = true
script.Parent.Parent.Parent.Gate2.Path2.Script.Disabled = false

end

script.Parent.Touched:Connect(onTouched)
Report Abuse
AgentBooth57 is not online. AgentBooth57
Joined: 26 Jun 2009
Total Posts: 274
30 Jul 2011 06:28 PM
it does nothing, i need help
Report Abuse
chikenugget is not online. chikenugget
Joined: 09 May 2009
Total Posts: 2552
30 Jul 2011 06:34 PM
function onTouched()
script.Parent.Parent.Parent.Gate2.Path2.Script.Disabled = true
for i = 1,12 do
script.Parent.Parent.Parent.Entrance["Part"..i].Transparency = 1
script.Parent.Parent.Parent.Entrance["Part"..i].CanCollide = false
wait(.08)
for i = 12,1,-1 do
wait(.8)
script.Parent.Parent.Parent.Entrance.["Part"..i].Transparency = 0
script.Parent.Parent.Parent.Entrance.["Part"..i].CanCollide = true
script.Parent.Parent.Parent.Gate2.Path2.Script.Disabled = false

end

script.Parent.Touched:connect(onTouched)
Report Abuse
AgentBooth57 is not online. AgentBooth57
Joined: 26 Jun 2009
Total Posts: 274
30 Jul 2011 06:35 PM
noone knows?
Report Abuse
AgentBooth57 is not online. AgentBooth57
Joined: 26 Jun 2009
Total Posts: 274
30 Jul 2011 06:36 PM
late, what was wrong with mine>? im trying to learm
Report Abuse
chikenugget is not online. chikenugget
Joined: 09 May 2009
Total Posts: 2552
30 Jul 2011 06:37 PM
If mine worked, that is.

I shortened it (alot) and changed :Connect to :connect
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