Hi everyone. I have been for a while now, creating my game. I wanted to incorporate the usage of Graph to give player a better understanding about the physics of the game.
Which scenario to use a Graph?
As I am creating a FPS game, I want to make it as realistic as you can get in . Probably not that realistic but works for now. Anyway, I enjoyed playing Phantom Forces a lot. But I realized that it does not have weather effects on the game. I thought this would be a brilliant idea and wanted to create a Realistic FPS Shooter. During that time, I realized that the weather does take on effect on the accuracy, stability, gun swaying and other realistic aspects. To show the balance performance of the gun, I decided to create a running graph, showing the gun performance.
About the Graph
So the graph updates every 5 seconds. The relation of the graph is to show the Gun Stability, which uses a range from 1 - 7, 1 being all round horrible and shown in colour Red and 7 is specific portion of the gun is damaged. 5 is the normal range and the most common range.
Now, I was working on it. Things were going smooth. But then, I came across a problem which I have no clue on solving it.
When you see an actual graph, you see that it is smooth. There are many smooth options in . However in GUI (Graphic User Interface), the only one that I know of is TweenService. The parameters of TweenService are
UDim2 endSize
UDim2 endPosition
EasingDirection
EasingStyle
float Time
bool Override
CallBack function
However it does not take into account for the Rotation of GUI's. The Rotation of Gui should already be specified before tweening it. I have bunch of dots in my Screen and I want my lines to be pin point accurate in the Screen.
I have tried doing the following example below.
frame:TweenSizeAndPosition(UDim2.new(0.6, 0, 0, 9),UDim2.new(0.157, 0, 0.486, 0),"Out", "Quad", 3)
The (0.157, 0, 0.486, 0) is the actual position of the frame. No this does not work. It slides down. Graphing cannot have any errors. Also, I do not want to define the Rotation beforehand. So how would I get around this???
In case you did not understand what Frame refers to; it is the line which represents the ratio.
[EDIT] Why the GUI TweenService will not work
Now. Gui TweenService does not take into account for the rotation which leaves me in two options. Either rotate it beforehand, or after the tween is played. By doing it afterhand, the whole animation looks horrible, and not very professional. If i did it beforehand, the graph would slide down because the properties changes due to the rotation defined previously.
####Any Suggestions on how I should achieve this? Let me know if the information I provided is not sufficient. Thank you for reading this.

6 comments
Do you just need to connect the dots on the graph with a gui line?
not quite. The dots are just there to help me position my frame according to the Gun Stability. So no.
Try using TweenService. Not the Tween API for UIs. TweenService allows you to smoothly transition properties to certain points. Try using that and change rotation using it as well. Also, if you want smoothness, use RunService. It can help you get smoothness, like the .RenderStepped() event is pretty smooth. Although, be aware, because RunService can only run locally.
What do you mean tween service doesn't take rotation into account? You can animate any numerical property with tween service: https://gyazo.com/834232da1c0819888ca7caa6df8d9bf0
Tween service does work with rotation, as it can take Vector3 values as parameter.
Thanks to KingLoneCat and ScriptGuider for their effort. Although there are some bugs that still persists, I am more than capable enough to deal with those. I had assumed that TweenService only worked for Parts and TweenSizeAndPosition only for GUI. Thank you for your help.