Is there any way to get a rotation between two positions
for example:
part points in direction of position2 from position1
Thanks
Exsius :)
Yes this is possible just read up the wiki, i'll post the link and an example
part.CFrame = CFrame.new(part.Position, Vector3.new(0,0,0)) -- this will point at 0,0,0 but still remain at the parts original position
devSeldom's awnser is a way but there is another way you can use with CFrame.
The other way use a method from CFrame called Lerp
this method use two parametre CFrame:lerp(CFrame goal, number alpha)
So you'll need to use this like that
local part = workspace.Part for i = 0, 1, 0.1 do wait(0.1) part.CFrame = part.CFrame:lerp(CFrame.new(5, 3, 1) * CFrame.Angles(math.pi / 2, math.pi / 2, 0), i) end
Now you can run it and look at the part, You'll see his mouvement. Hope this help you.