glurbman
|
  |
| Joined: 02 Nov 2010 |
| Total Posts: 1903 |
|
|
| 06 Mar 2015 10:03 AM |
Hi , does someone know a script wich changes the properties of every part in a model at the same time .... if yes could ya post it here??? please?
|
|
|
| Report Abuse |
|
|
AlgyLacey
|
  |
| Joined: 14 Jun 2013 |
| Total Posts: 3736 |
|
|
| 06 Mar 2015 10:28 AM |
function ChangeStat(Model) for i,Part in pairs(Model:GetChildren()) do if Part:IsA("Part") then Part.--change the stat here end end end
ChangeStat(game.Workspace.Model)
Try that. To make it run call do "ChangeStat(put the location of the model in here)"
-[ Where there is a will there is a way. I WILL be going THAT way ^ ]- |
|
|
| Report Abuse |
|
|
glurbman
|
  |
| Joined: 02 Nov 2010 |
| Total Posts: 1903 |
|
|
| 06 Mar 2015 11:06 AM |
| thank you very much ..im going to try it out |
|
|
| Report Abuse |
|
|
glurbman
|
  |
| Joined: 02 Nov 2010 |
| Total Posts: 1903 |
|
|
| 06 Mar 2015 11:18 AM |
""put the location of the model in here"" the location ????
ps. the name of my model is : ErrorViewModel
and i nedd that the script changes the reflectancy of every part in the model at the same time -by a specific wait time.....
for example my script : while true do script.Parent.Reflectance = .1 wait(.1) script.Parent.Reflectance = .2 wait(.1) script.Parent.Reflectance = .3 wait(.1) script.Parent.Reflectance = .4 wait(.1) script.Parent.Reflectance = .5 wait(.1) script.Parent.Reflectance = .6 wait(.1) script.Parent.Reflectance = .7 wait(.1) script.Parent.Reflectance = .8 wait(.1) script.Parent.Reflectance = .9 wait(.1) script.Parent.Reflectance = .8 wait(.1) script.Parent.Reflectance = .7 wait(.1) script.Parent.Reflectance = .6 wait(.1) script.Parent.Reflectance = .5 wait(.1) script.Parent.Reflectance = .4 wait(.1) script.Parent.Reflectance = .3 wait(.1) script.Parent.Reflectance = .2 wait(.1) script.Parent.Reflectance = .1 wait(.1) end
so : i need this for every part in my model at the same time ........... |
|
|
| Report Abuse |
|
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 06 Mar 2015 11:21 AM |
wiki.roblox.com/index.php?title=Writing_Clean_Code
look up for loops |
|
|
| Report Abuse |
|
|
glurbman
|
  |
| Joined: 02 Nov 2010 |
| Total Posts: 1903 |
|
|
| 07 Mar 2015 01:53 AM |
i dont look for loops ..... i need the wait timr between each change!
i look for a script wich i can put in my model so it changes the properties of al parts at the same time , instead of adding the script into any single part ( wich causes lags and a weird effect) |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2015 01:55 AM |
while true do for i = 0,1,+.1 do script.Parent.Reflectance = i end Not tested by the way. |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2015 01:58 AM |
while true do for i = 0,1,+.1 do script.Parent.Reflectance = i wait(.1) end
Try this instead, still not tested. |
|
|
| Report Abuse |
|
|
RobuxLife
|
  |
| Joined: 19 Sep 2012 |
| Total Posts: 13336 |
|
|
| 07 Mar 2015 02:02 AM |
for i = 1, 10 do script.Parent.Transparency = i/10 wait(0.1) end
What this does is starting from 1, it changes it transparency every tenth of a second 10 times. Its waayyyy easier |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2015 02:03 AM |
| Just use my way. It wasn't made by a person without real exp with scripting. |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2015 02:07 AM |
Well maybe try this instead; for i = 0,1,+.1 do script.Parent.Reflectance = i wait(.1) end |
|
|
| Report Abuse |
|
|
glurbman
|
  |
| Joined: 02 Nov 2010 |
| Total Posts: 1903 |
|
|
| 07 Mar 2015 02:09 AM |
your way didnt worked ...and ps. I DONT NEED A NEW WHILE TRUE DO SCRIPT --- i need a version of my script wich changes the reflectance of all parts in a model . so i paste the script into a model and every single part gets the new propertie value at the same time .......
do understand me now??? |
|
|
| Report Abuse |
|
|
glurbman
|
  |
| Joined: 02 Nov 2010 |
| Total Posts: 1903 |
|
|
| 07 Mar 2015 02:10 AM |
| ps. srry for the bad english ..i dont have much time to write... |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2015 02:12 AM |
model = script.Parent for i,v in pairs(model:children())do for i = 0,1,+.1 do v.Reflectance = i wait(.1) end end
Boom I win. |
|
|
| Report Abuse |
|
|
glurbman
|
  |
| Joined: 02 Nov 2010 |
| Total Posts: 1903 |
|
| |
|
glurbman
|
  |
| Joined: 02 Nov 2010 |
| Total Posts: 1903 |
|
|
| 07 Mar 2015 02:16 AM |
ERROR : expected identifier, got "+" ???? |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2015 02:17 AM |
model = script.Parent for i,v in pairs(model:children())do for i = 0,1,.1 do v.Reflectance = i wait(.1) end end
There, I officially win now |
|
|
| Report Abuse |
|
|
glurbman
|
  |
| Joined: 02 Nov 2010 |
| Total Posts: 1903 |
|
|
| 07 Mar 2015 02:23 AM |
it seems to work ...but all parts just get full reflectance ..and not all at the sme time ...they also should get back to 0 reflectance and then back to a maximum of 0.4 reflectance...like a loop but!: i need different timers for it so they stay longer at reflect 0.4 than 0... do you understand? |
|
|
| Report Abuse |
|
|