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
|
  |
| 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 |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
| |
|
|
| 14 Jun 2012 11:42 AM |
| You use my script to make them disappear at once... |
|
|
| Report Abuse |
|
|
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
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
|
| 14 Jun 2012 12:57 PM |
| Also TURN YOUR SOUND ALL THE WAY UP!!! |
|
|
| Report Abuse |
|
|
GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
| |
|
GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
|
| 14 Jun 2012 02:22 PM |
| Guys I'm needing this for my game. |
|
|
| Report Abuse |
|
|