|
| 19 Jan 2014 09:50 PM |
could someone plz help me? i really dont have much knowledge with scripts and just threw together something, could someone help me straighten it out?
v = script.Parent a = script.Parent.Parent.Thruster1 b = script.Parent.Parent.Thruster2 c = script.Parent.Parent.Thruster3 d = script.Parent.Parent.Thruster4 t = Transparency t = max (1) or min (0) mod = v.MaxSpeed/200 while true do wait(0.1) mod = v.MaxSpeed/200 if v.Throttle == 1 then a.Transparency = a.Transparency + (.01/mod) b.Transparency = a.Transparency + (.01/mod) c.Transparency = a.Transparency + (.01/mod) d.Transparency = a.Transparency + (.01/mod) end if v.Throttle == 0 then a.Transparency = a.Transparency - (0.05/mod) b.Transparency = a.Transparency - (0.05/mod) c.Transparency = a.Transparency - (0.05/mod) d.Transparency = a.Transparency - (0.05/mod) end if v.Throttle == -1 then a.Transparency = a.Transparency - (0/mod) b.Transparency = a.Transparency - (0/mod) c.Transparency = a.Transparency - (0/mod) d.Transparency = a.Transparency - (0/mod) end end |
|
|
| Report Abuse |
|
|
|
| 19 Jan 2014 10:03 PM |
What is this?
t = max (1) or min (0)
Also, put mod inside the loop so it 'refreshes' as speed changes. |
|
|
| Report Abuse |
|
|
|
| 19 Jan 2014 10:07 PM |
| well seeing that before the t= max (1) or min (0) , the transparency would continue to go into the negative and not return, i thought that with a set on what was maximum and what was minimum would set it to not go past those set values, but i figured wrong... i shall try what you suggested |
|
|
| Report Abuse |
|
|
|
| 19 Jan 2014 10:09 PM |
im sorry, im such an idiot, i see my huge typo now T_T but i will remain this thread for further problems
|
|
|
| Report Abuse |
|
|
|
| 19 Jan 2014 10:15 PM |
ok heres edited script, still doesnt work... also how would i make it so the transparency doesnt go higher than 1 or lower than 0?
v = script.Parent a = script.Parent.Parent.Thruster1 b = script.Parent.Parent.Thruster2 c = script.Parent.Parent.Thruster3 d = script.Parent.Parent.Thruster4 t = Transparency while true do wait(0.1) mod = v.MaxSpeed/200 if v.Throttle == 1 then a.Transparency = a.t + (.01/mod) b.Transparency = b.t + (.01/mod) c.Transparency = c.t + (.01/mod) d.Transparency = d.t + (.01/mod) end if v.Throttle == 0 then a.Transparency = a.t - (0.05/mod) b.Transparency = b.t - (0.05/mod) c.Transparency = c.t - (0.05/mod) d.Transparency = d.t - (0.05/mod) end if v.Throttle == -1 then a.Transparency = a.t - (0/mod) b.Transparency = b.t - (0/mod) c.Transparency = c.t - (0/mod) d.Transparency = d.t - (0/mod) end end |
|
|
| Report Abuse |
|
|
|
| 19 Jan 2014 10:22 PM |
v = script.Parent a = script.Parent.Parent.Thruster1 b = script.Parent.Parent.Thruster2 c = script.Parent.Parent.Thruster3 d = script.Parent.Parent.Thruster4 while true do wait(0.1) mod = v.MaxSpeed/200 if v.Throttle == 1 then a.Transparency = math.min(a.Transparency + (.01/mod), 1) b.Transparency = math.min(b.Transparency + (.01/mod), 1) c.Transparency = math.min(c.Transparency + (.01/mod), 1) d.Transparency = math.min(d.Transparency + (.01/mod), 1) end if v.Throttle == 0 then a.Transparency = math.max(a.Transparency - (0.05/mod), 0) b.Transparency = math.max(b.Transparency - (0.05/mod), 0) c.Transparency = math.max(c.Transparency - (0.05/mod), 0) d.Transparency = math.max(d.Transparency - (0.05/mod), 0) end end |
|
|
| Report Abuse |
|
|
|
| 19 Jan 2014 10:28 PM |
| omg, thank you soo much! I will credit you in my game now as well as a game teleport for you |
|
|
| Report Abuse |
|
|
|
| 19 Jan 2014 10:30 PM |
| It works? lol No need to do any of that. :) |
|
|
| Report Abuse |
|
|
|
| 19 Jan 2014 10:36 PM |
| lol yes it worked :DDD you like saved my hover car animations lol, i just had to flip some stuff around but it works great now |
|
|
| Report Abuse |
|
|