I have a script I’m testing to get something working.
task.wait(5)
local Ball = workspace.board.ball
workspace.GData.Direction.Value = 1
local function printOrientation()
print(Ball.Orientation)
end
game:GetService("RunService").Stepped:Connect(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?
task.wait(5)
local Ball = workspace.board.ball
workspace.GData.Direction.Value = 1
local function printPosition()
print(Ball.Position)
end
game:GetService("RunService").Stepped:Connect(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.
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)
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.
??? 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.
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.
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.