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 with hovercar anime

Previous Thread :: Next Thread 
SkyNight56 is not online. SkyNight56
Joined: 06 Sep 2009
Total Posts: 191
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
ElectricAxel is not online. ElectricAxel
Joined: 15 May 2009
Total Posts: 16239
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
SkyNight56 is not online. SkyNight56
Joined: 06 Sep 2009
Total Posts: 191
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
SkyNight56 is not online. SkyNight56
Joined: 06 Sep 2009
Total Posts: 191
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
SkyNight56 is not online. SkyNight56
Joined: 06 Sep 2009
Total Posts: 191
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
ElectricAxel is not online. ElectricAxel
Joined: 15 May 2009
Total Posts: 16239
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
SkyNight56 is not online. SkyNight56
Joined: 06 Sep 2009
Total Posts: 191
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
ElectricAxel is not online. ElectricAxel
Joined: 15 May 2009
Total Posts: 16239
19 Jan 2014 10:30 PM
It works? lol No need to do any of that. :)
Report Abuse
SkyNight56 is not online. SkyNight56
Joined: 06 Sep 2009
Total Posts: 191
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
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