Ok, so this is my dilemma. I am making a tracking gui for a moving hand, and to track where the player is in between the start, and finish of a map. This is the code. Can someone show me how I can get the speed of the moving hand, and check if it is in between the start, and finish?
local Player = game.Players.LocalPlayer
local pos1 = nil
local pos2 = nil
local playerspeed = Player.Character.Humanoid.WalkSpeed --studs a second
local torso = Player.Character.Torso.Position
local initX = script.Parent.Size.X.Offset
while wait() do
pos1 = game.Workspace.TheHand.Hand.Position
pos2 = game.Workspace:FindFirstChild(Player.Name).Torso.Position
point = game.Workspace.TheHand.Finish.Position
local handdistance = (pos1 - point).magnitude
local fromplayer = (pos1 - point).magnitude
local pointdistance = (pos2 - point).magnitude
local handtime = fromplayer/25
local arrivaltime = pointdistance/playerspeed
--print('The hand is '..handaway..' seconds away!')
local Pie = (pointdistance / 16)
script.Parent.LPlayername:TweenPosition(UDim2.new(1, -115, 0, 1000/initX*Pie),"Out","Sine",0.25)
script.Parent.Hand:TweenPosition(UDim2.new(-1.5, 0, 0, 1000/initX*handtime),"Out","Sine",0.25)
end

3 comments
Edit your post to use Lua code formatting. A row of ~~~~ should be before and after the code on its own line.
Done
@JuanShedletsky Highlight all the code you have and hit the blue 'Lua' button.