Well, basically, I've been working on making multi-point-move-to-mini-cutscenes (I might change cutscenes to movies later on...). As of now, I've got the general script, but have been having errors letting the script know when to initiate the next MoveTo line. The player will move to the general location, but will not stop, and keeps on moving forward. Here's what I have (of the important code):
local lplayer = game.Players.LocalPlayer.Character.Humanoid
lplayer:MoveTo(Vector3.new(-184.3, 751.101, 1.9))
repeat wait() until game.Players.LocalPlayer.Character.Torso.Position.x == Vector3.new(-184.3, 751.101, 1.9)
lplayer:MoveTo(Vector3.new(-169.5, 751.101, 0.9))
repeat wait() until game.Players.LocalPlayer.Character.Torso.Position == Vector3.new(-169.5, 751.101, 0.9)
This, however, is not working. I've tracked the numbers, and they change a bit every time based upon the starting position, player's lag, and in some instances, speed. Therefore, the torso's CFrame will not always reach the designated point.
I've tried using math.floor and then checking for the refined number, however, to no avail:
local torx = game.Players.LocalPlayer.Character.Torso.Position.x
local tory = game.Players.LocalPlayer.Character.Torso.Position.y
local torz = game.Players.LocalPlayer.Character.Torso.Position.z
local torsx = (math.floor(torx+0.5))
local torsy = (math.floor(torx+0.5))
local torsz = (math.floor(torx+0.5))
And then, on the repeat, checking like so:
repeat wait() until (torsx == -184) and (torsy == 751) and (torsz == 2)
However, whenever I print(torsx) for instance (after the first MoveTo line, or in the first wait()), it returns the same value over and over.
EDIT -- As I've found out, the values that it returns are the point when the MoveTo is first initiated, even if the player has moved. Would this be attributed to me removing the player's controls?
So, my question is this; how do I fix this math.floor method, or what is a better method to use instead of it?
Thank you for reading, and I hope to find a solution!

2 comments
Well, that worked just fine! Thank you for the detailed answer (after that long, I wasn't really expecting one). Just for future note, the wait had to stay wait(), otherwise it'd not always register. I also had to change magnitude from 1 to 2 for any checks after the first (otherwise it'd activate around 1/2 of the time). But, regardless, it's now working flawlessly.
Well, as I just found out, for the first check as well. It might be a flaw on my part based on torso height in comparison, but magnitude is more than precise enough for what I need.