This answer's to be used as a reference
The answer's very simple, believe it or not. :p The answer's to use math.abs! :O
What math.abs does's it returns the number as a positive (to put very simply), or as the Dev Hub says, it returns the absolute value of x. An example of abs would be;
for i = -10, 0 do
print(math.abs(i))
end
Something to note's that if the number's already positive, it wont change it to a negative. :p
for i = 0, 10 do
print(math.abs(i))
end
Stuff talked about
Math.abs - Returns a number as a positive.
If you have any questions, feel free to let me know. :)
I hope this helped! :D
EDIT Just as I mentioned, you could try creating a variable for the orientation, then check if it's less than 0, and if so change it to a positive. An example of this's;
local YOrientation = Engine.Orientation.Y
YOrientation = YOrientation < 0 and -YOrientation or YOrientation
TextLabel.Text = tostring(YOrientation)
Please let me know if anything changes. :)
8 comments
lol, my answer does say "workspace" though
This operates on a normal script inside a part?
Well, the Text is a Property under a GuiObject, so you should be using a LocalScript
Isn't there another way to not use local script? https://gyazo.com/249ae1d2cd257c9e8deca6ebac54c3be
Ok I tested it (the above code) out with that set-up, and yes it will work in a Server Script, https://gyazo.com/6c52a6427b57d207185e26bc0c56a483
Use whichever one you want mcandrobloxunited is just dumb
Hm, well in studio it appears to not function as intended.
Well never mind, It works! Thanks you for your help and your assist!