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 the ignorant newbie

Previous Thread :: Next Thread 
FluffPuff100 is not online. FluffPuff100
Joined: 18 Mar 2012
Total Posts: 232
02 Sep 2013 06:46 PM
For some reason, this isn't doing what I want. It's functioning, but weirdly. It's supposed to make about a hundred bricks in a model turn invisible over about a second, but instead of doing that, it cycles through each individual brick and makes it become transparent and then opaque, and moves on to the next one. How can I make all one hundred bricks change properties at exactly the same time?

Here's the script. It was working fine and making all the parts transparent at what I THINK was exactly the same time, until I added the 5th line all the way up to the line right before end.

while wait() do
for i,v in pairs (script.Parent:GetChildren()) do
if v:IsA("BasePart") then
v.Transparency = 0.1
wait(0.01)
v.Transparency = 0.2
wait(0.01)
v.Transparency = 0.3
wait(0.01)
v.Transparency = 0.4
wait(0.01)
v.Transparency = 0.5
wait(0.01)
v.Transparency = 0.6
wait(0.01)
v.Transparency = 0.7
wait(0.01)
v.Transparency = 0.8
wait(0.01)
v.Transparency = 0.9
wait(0.01)
v.Transparency = 1
wait(0.01)
v.Transparency = 0.9
wait(0.01)
v.Transparency = 0.8
wait(0.01)
v.Transparency = 0.7
wait(0.01)
v.Transparency = 0.6
wait(0.01)
v.Transparency = 0.5
wait(0.01)
v.Transparency = 0.4
wait(0.01)
v.Transparency = 0.3
wait(0.01)
v.Transparency = 0.2
wait(0.01)
v.Transparency = 0.1
wait(0.01)
end
end
end
Report Abuse
evolvedpikachu is not online. evolvedpikachu
Joined: 18 Aug 2010
Total Posts: 10696
02 Sep 2013 06:52 PM
while wait() do
for I = 1, 10 do
for I, v in ipairs(script.Parent:GetChildren()) do
if v:IsA("BasePart") then
wait(0.01)
v.Transparency = v.Transparency + 0.1
end
end
end
for I = 1, 10 do
for I, v in ipairs(script.Parent:GetChildren()) do
if v:IsA("BasePart") then
wait(0.01)
v.Transparency = v.Transparency - 0.1
end
end
end
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