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: Simple script not working

Previous Thread :: Next Thread 
mattkabag is not online. mattkabag
Joined: 13 Dec 2008
Total Posts: 3156
09 Aug 2014 12:11 AM
opening = script.Parent.Open.ClickDetector.MouseClick
closing = script.Parent.Close.ClickDetector.MouseClick

a = script.Parent.Part1.script.Parent.Part2.script.Parent.Part3.script.Parent.Part4.script.Parent.Part5.script.Parent.Part6script.Parent.Part7.script.Parent.Part8.script.Parent.Part9.script.Parent.Part10

function Close()
a.Transparency = 0.4
wait(0.1)
a.Transparency = 0.3
wait(0.1)
a.Transparency = 0.2
wait(0.1)
a.Transparency = 0.1
wait(0.1)
a.Transparency = 0
end
function Open()
a.Transparency = 0.1
wait(0.1)
a.Transparency = 0.2
wait(0.1)
a.Transparency = 0.3
wait(0.1)
a.Transparency = 0.4
wait(0.1)
a.Transparency = 0.5
end

closing:connect(Close)
opening:connect(Open)
Report Abuse
TeddyBauer is not online. TeddyBauer
Joined: 24 Jul 2014
Total Posts: 224
09 Aug 2014 12:27 AM
well

a = script.Parent.Part1.script.Parent.Part2.script.Parent.Part3.script.Parent.Part4.script.Parent.Part5.script.Parent.Part6script.Parent.Part7.script.Parent.Part8.script.Parent.Part9.script.Parent.Part10

makes no sense to the script so it says "a is nil".
Report Abuse
mattkabag is not online. mattkabag
Joined: 13 Dec 2008
Total Posts: 3156
09 Aug 2014 12:34 AM
ok so would i put:
script.Parent.Model.GetChildren
or
script.Parent.Model.Children
Report Abuse
mattkabag is not online. mattkabag
Joined: 13 Dec 2008
Total Posts: 3156
09 Aug 2014 12:42 AM
I tried

opening = script.Parent.Open.ClickDetector.MouseClick
closing = script.Parent.Close.ClickDetector.MouseClick

a = {"Part1", "Part2", "Part3", "Part4", "Part5", "Part6", "Part7", "Part8", "Part9", "Part10"}

Still didn't work, I also tried:

a = script.Parent.Model.Children

didnt work as well :((
Report Abuse
Fidgeting is not online. Fidgeting
Joined: 08 Feb 2014
Total Posts: 1193
09 Aug 2014 12:51 AM
GetChildren()
Report Abuse
mattkabag is not online. mattkabag
Joined: 13 Dec 2008
Total Posts: 3156
09 Aug 2014 12:54 AM
still didnt work, and ik the script works because when i do:

script.Parent.Model.Part1

it works but only on one of the bricks
Report Abuse
mattkabag is not online. mattkabag
Joined: 13 Dec 2008
Total Posts: 3156
09 Aug 2014 01:07 AM
help pls!
Report Abuse
ehern11 is not online. ehern11
Joined: 23 Apr 2011
Total Posts: 1541
09 Aug 2014 01:20 AM
function close()
for _,v in pairs(script.Parent.Model:GetChildren()) do
for i = 0.5,0,-0.1 do
v.Transparency = i
end
end

function open()
for _,v in pairs(script.Parent.Model:GetChildren()) do
for i = 0,0.5,0.1 do
v.Transparency = i
end
end
Report Abuse
mattkabag is not online. mattkabag
Joined: 13 Dec 2008
Total Posts: 3156
09 Aug 2014 02:24 AM
so i did this

opening = script.Parent.Open.ClickDetector.MouseClick
closing = script.Parent.Close.ClickDetector.MouseClick

function close()
for _,v in pairs(script.Parent.Model:GetChildren()) do
for i = 0.5,0,-0.1 do
v.Transparency = i
end
end

function open()
for _,v in pairs(script.Parent.Model:GetChildren()) do
for i = 0,0.5,0.1 do
v.Transparency = i
end
end
end
end

closing:connect(Close)
opening:connect(Open)



still didnt work
Report Abuse
mattkabag is not online. mattkabag
Joined: 13 Dec 2008
Total Posts: 3156
09 Aug 2014 05:21 AM
help D:
Report Abuse
ehern11 is not online. ehern11
Joined: 23 Apr 2011
Total Posts: 1541
09 Aug 2014 01:48 PM
omf
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