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: Fading Script. Need Help!

Previous Thread :: Next Thread 
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
13 Jun 2012 10:37 PM
Okay so how do I make this script fade a model named "Cloud"??


s = game.Workspace.slime

while true do
s.Transparency = 0.1
wait(0.1)
s.Transparency = 0.2
wait(0.1)
s.Transparency = 0.3
wait(0.1)
s.Transparency = 0.4
wait(0.1)
s.Transparency = 0.5
wait(0.1)
s.Transparency = 0.6
wait(0.1)
s.Transparency = 0.7
wait(0.1)
s.Transparency = 0.8
wait(0.1)
s.Transparency = 0.9
wait(0.1)
s.Transparency = 1
wait(0.1)
end

Please do note, the "Slime" was from another model. (Script is not mine, but I'm using it to learn.)
Report Abuse
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
13 Jun 2012 11:06 PM
Bump!

Egh.... Need help on another thing :/

How do I scale a model???? (NOT mini map)

I know for a brick, the scale script would look like this... but I need the model to scale...

wait(0.1)
Boom = script.Parent
for i = 1, 600 do
Boom.Size = Boom.Size + Vector3.new(1, 0, 1)
wait(0.01)
end
Boom:Remove()

So how do I do this?
Report Abuse
bananacupcake is not online. bananacupcake
Joined: 15 Jun 2010
Total Posts: 571
13 Jun 2012 11:22 PM
First off, you cannot fade a model. If "cloud" is a part, you can fade it. If not, then you have to go to each part in a model and fade it.

s = game.Workspace.slime

for i = 0,1,0.1 do
wait(.01)
s.Transparency = i
end

Also, try this. It is much more efficient. (If you need it to loop, put a while true do around it)
Report Abuse
bananacupcake is not online. bananacupcake
Joined: 15 Jun 2010
Total Posts: 571
13 Jun 2012 11:24 PM
As per your other question, you can't scale a model. You have to scale down each individual part.

As far as I know, the only thing you can do with a model is TranslateBy.
Report Abuse
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
13 Jun 2012 11:30 PM
Positive???

:/

I'm STILL trying to make a mushroom could GROW and FADE... Just to add some realism.
Report Abuse
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
13 Jun 2012 11:34 PM
I give up on fading the model... I'll go brick by brick...

One thing.

My script fades only ONE brick.

s = game.Workspace.cloud

while true do
s.Transparency = 0.1
wait(0.1)
s.Transparency = 0.2
wait(0.1)
s.Transparency = 0.3
wait(0.1)
s.Transparency = 0.4
wait(0.1)
s.Transparency = 0.5
wait(0.1)
s.Transparency = 0.6
wait(0.1)
s.Transparency = 0.7
wait(0.1)
s.Transparency = 0.8
wait(0.1)
s.Transparency = 0.9
wait(0.1)
s.Transparency = 1
wait(0.1)
end

How do I make it to where it would fade all bricks named "cloud"???
Report Abuse
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
13 Jun 2012 11:53 PM
Oh and... Make it to where I can group the bricks and script together and it still works.
Report Abuse
bananacupcake is not online. bananacupcake
Joined: 15 Jun 2010
Total Posts: 571
14 Jun 2012 12:16 AM
cloud = script.Parent:GetChildren()
for i = 1, #cloud do
if cloud[i].Name == "Cloud" then
for i = 0,1,.1 do
cloud[i].Transparency = i
end
end
end

This should work. Put the script and parts named 'Cloud' inside of a model.
Report Abuse
Fizzzzzlemaster is not online. Fizzzzzlemaster
Joined: 07 Jul 2009
Total Posts: 4612
14 Jun 2012 12:51 AM
What's the [i] for? And what about
for i = 1, #cloud do
Does that make it so it finds how many are inside cloud, then do it that many times?

~Gloria Domini, in nomine superbia~
Report Abuse
Cheater is not online. Cheater
Joined: 29 Jun 2007
Total Posts: 5258
14 Jun 2012 01:14 AM
cloud = script.Parent:GetChildren() --Get's all parts inside cloud (the script must be inside that cloud)
for i = 1, #cloud do --"i" means that it will take one part of cloud
if cloud[i].Name == "Cloud" then --if the name of that thing is "Cloud" it will go on
for i = 0,1,.1 do
cloud[i].Transparency = i
end
end
end
Report Abuse
SourceLeak is not online. SourceLeak
Joined: 10 Jun 2012
Total Posts: 841
14 Jun 2012 01:28 AM
for i, v in pairs(script.Parent:GetChildren())do
trans(v)
end

function trans(brick)
for a=0, 1, 0.1 do
brick.Transparency = a
wait()
end
Report Abuse
SourceLeak is not online. SourceLeak
Joined: 10 Jun 2012
Total Posts: 841
14 Jun 2012 01:29 AM
for i, v in pairs(script.Parent:GetChildren())do
trans(v)
end

function trans(brick)
for a=0, 1, 0.1 do
brick.Transparency = a
wait()
end
end


Fix.
Report Abuse
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
14 Jun 2012 09:20 AM
I do not understand how I'm suppose to use this...

Would some one mind telling me what all that means? (I'm still learning Lua...)
Report Abuse
DivineJoker is not online. DivineJoker
Joined: 02 Nov 2011
Total Posts: 41
14 Jun 2012 09:43 AM
Put this script INSIDE the model.

while wait() do
for i, v in pairs(script.Parent:GetChildren()) do
if v:IsA("BasePart") then
for a = 0, 1, 0.1 do
v.Transparency = a
wait(0.1)
end
end
end
end

† KMXD †
Report Abuse
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
14 Jun 2012 09:46 AM
>.< What part can I edit to change the transparency value???

And "BasePart" is where I would put "cloud" in?? (That's the name of the brick.)
Report Abuse
DivineJoker is not online. DivineJoker
Joined: 02 Nov 2011
Total Posts: 41
14 Jun 2012 09:49 AM
I already changed the Transparency for you it will go from 0 to 1 in about a second like you wanted, but if you want to change it:

    for a = 0, 1, 0.1 do
    v.Transparency = a
    wait(0.1)
    end

And no, don't change "BasePart", that would just check the model for parts, because if there are non-parts in the model, like the script itself, it will error, because scripts don't have Transparency properties.

† KMXD †
Report Abuse
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
14 Jun 2012 09:57 AM
So group 3brick together
then inster>Object>Script
Then do this?

while true do
while wait() do
for i, v in pairs(script.Parent:GetChildren()) do
if v:IsA("BasePart") then
for a = 0, 1, 0.1 do
v.Transparency = a
wait(0.1)
end
end
end
end

Is there anything I need to change? (Do I need to put the model or brick name somewhere? And if so then please tell me where.)
Report Abuse
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
14 Jun 2012 09:59 AM
Uh oh....

It works... but one prob, how do I make them all disappear at once?

And forget the while true do... (Don't know why I typed that..)
Report Abuse
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
14 Jun 2012 10:41 AM
bump
Report Abuse
SourceLeak is not online. SourceLeak
Joined: 10 Jun 2012
Total Posts: 841
14 Jun 2012 11:42 AM
You use my script to make them disappear at once...
Report Abuse
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
14 Jun 2012 12:50 PM
@Sourceleak

I did. And nothing happened.

If you would like to see what I'm trying to do... Download this model: http://www.roblox.com/Nuke-item?id=83571868

Its got your script in it... If you wouldn't mind telling me what I'm doing wrong...
Report Abuse
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
14 Jun 2012 12:57 PM
Also TURN YOUR SOUND ALL THE WAY UP!!!
Report Abuse
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
14 Jun 2012 01:23 PM
bump
Report Abuse
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
14 Jun 2012 02:22 PM
Guys I'm needing this for my game.
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