Odd outcome with program reading Orientation

I have a script I’m testing to get something working.


local Ball = workspace.board.ball
workspace.GData.Direction.Value = 1

local function printOrientation()


The ball is being rotated via tween script. In the program I’m working with it will only show the Orientation as it was when the program started. The ball is turning as intended and it’s Orientation is changing. The print out stays the same as the Orientation when started.

However If I do all this in a test program the Orientation then prints out as intended.
What possibly could be the difference here? Why would it work in one program by not the other?
All the paths are correct … the one it’s working on is just a default set up. Is there some setting that would make this happen?


local Ball = workspace.board.ball
workspace.GData.Direction.Value = 1

local function printPosition()


Same thing, works in one program but not the other …
(the ball is moving in a circle this time and it is changing position)

GData is triggering the tween animation. Working fine.


Tween that is spinning this ball is in local script or server script?

1 Like

Everything here is not a local script. I don’t see how it could work in one program but not the other …

Also changing orientation will not make ball move you will need Force for this or change velocity of ball.

I just want to know what it is … not changing anything.
I want to use that to key off some other task.
It will not update the change at all in the print, even though it is working fine in both programs.

It has to be some type of overall setting …

I’ve tried many different ways of showing me the print. All I need it to do is return the correct Position or Orientation … It just not changing at all in the one program. (the real program)

and what you mean by different program?

I have the real program I’m working on, this just would not print the right thing …
So I made a new program dealing with just this part of the main program to test with.
Everything to do with this part is the same.

so you are testing somthing in roblox studio and other program that uses lua code?

ya. Pulled just this part out to test with. And it works fine in the test program.

Well I have no idea what you mean by different program and I still dont know what and where should work.

??? I have a main program. That I need this to work on. It just will not tell me the Position or Orientation other than where it was when the program started.

I’m pretty sure I read on a recent post that you shouldn’t be trying to read an objects Orientation, you should read its CFrame instead.

1 Like

Tried that too … I’m thinking I have some type of overall program setting different in the main program. What else could this be?

Maybe try pushing it with haracter?

Are you by chance doing this in your Main Script:

local partPosition = part.Position
local partOrientation = part.Orientation

If you declared this outside of a loop, it will print the same results because referencing Position or Orientation wont reflect any changes made to it and will only show the value at the moment the property was referenced.

I’ve tried inside the loop … also

Can you send a snippet of the code in your Main Script that is responsible for printing out these values?

What I’m doing here is trying to track the sun position untill it is in back of the ship. Then it will brake orbit…

You’re printing the Z Component of the Sun’s Position while in your test program you are printing the full Position Vector which is why it’s different, unless you mean nothing at all is being printed.

No matter what i ask for it will not print anything but what it was when the program started.