|
| 13 Feb 2015 03:50 PM |
would you make a tiny bar inside a long rectangle
then give the gui bar a value in the script so
the bar raises in position by 1 for every 1 mph faster you go?
I guess you would have to connect the vehicle seat into this some how to.
or else the script wouldn't know where to find the current maxspeed number?
|
|
|
| Report Abuse |
|
|
|
| 13 Feb 2015 03:51 PM |
How would you make a speed gui script?
Sorry keep forgetting to read over my work for mistypes. |
|
|
| Report Abuse |
|
|
Hibobb
|
  |
| Joined: 18 Apr 2010 |
| Total Posts: 2146 |
|
|
| 13 Feb 2015 03:52 PM |
I would increase the size and make it connected to the speed. For example if the speed currently is 5 then the bar is 50 pixels something like that. This way if they are dropping and gaining speed quickly the gui doesn't get messed up trying to add and subtract.
Hey, check this place out! http://www.roblox.com/Maze-Escape-Deep-Alpha-place?id=194858740 |
|
|
| Report Abuse |
|
|
|
| 13 Feb 2015 05:19 PM |
| So what your saying is change the size instead of position? |
|
|
| Report Abuse |
|
|
|
| 13 Feb 2015 05:22 PM |
thank you for input
Could any one help me with the line of code though? |
|
|
| Report Abuse |
|
|
|
| 13 Feb 2015 05:24 PM |
Idk where to start would i keep the script
in workspace, or put it in vehicle seat? |
|
|
| Report Abuse |
|
|
|
| 13 Feb 2015 05:26 PM |
| Some one please bump while i'm gone need help with this. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
|
| 13 Feb 2015 06:03 PM |
| 38 view one post does any one know how to do this? |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 13 Feb 2015 06:08 PM |
Bump.
"I like to program." - Bosswalrus |
|
|
| Report Abuse |
|
|
|
| 13 Feb 2015 06:12 PM |
Gui - container > Frame - static background (grey area) > > Frame - volatile background (red or something to represent health) > > Text Label - text, invisible (To display x/y)
http://wiki.roblox.com/index.php?title=VehicleSeat According to the wiki, we have... float MaxSpeed Vector3 Velocity
Velocity reads... Description: The speed and movement direction of the object.
Meaning no matter which way you are moving, there is a current speed. If my knowledge over vectors serves me, the speed would be the time it takes to get from point A to point B. Thusly, you would use magnitude or Pythagorean theorem (C^2=A^2+B^2).
Given our Gui build, we can figure this into the volatile frame and text: Gui.Container.VolatileBackground.Size = UDim2.new(VehicleSeat.magnitude/MaxSpeed,0,1,0) Gui.Container.DisplayText.Text = VehicleSeat.magnitude.."/"..MaxSpeed
HOWEVER... MaxSpeed is a float and you will need to math.floor() this else you'd get... 33.3333333333334 as your text or similar.
If you were to have used pixel size (and say it was 300 pixels (at max) long)... UDim2.new((VehicleSeat.magnitude/MaxSpeed)/300,0,1,0)
I hope this helps.
|
|
|
| Report Abuse |
|
|
|
| 13 Feb 2015 07:01 PM |
| Accept my fr request and i will send you party and show you the gui. |
|
|
| Report Abuse |
|
|
| |
|
|
| 13 Feb 2015 07:30 PM |
| first i should prob learn how to look the position of a gui :l |
|
|
| Report Abuse |
|
|