I can’t seem to figure out how to rotate my eyeball correctly, im basically trying to make it move and rotate 90 degrees each time but every time i do it it does a spin, i just want it to turn correctly instead of spinning.
local rot = Vector3.new(0, 0, 0)
function nextPointMove()
local points = {workspace.Position1, workspace.Position2, workspace.Position3, workspace.Position4}
local currentPoint = nil
local nextPoint = nil
for _,point in pairs(points) do
if currentPoint == nil then currentPoint = points[1] end
if currentPoint == point then
if num == 5 then
nextPoint = Vector3.new(points[1].Position.X, handle.Position.Y, points[1].Position.Z)
num = 1
else
nextPoint = Vector3.new(points[num].Position.X, handle.Position.Y, points[num].Position.Z)
num += 1
end
currentPoint = Vector3.new(point.Position.X, handle.Position.Y, point.Position.Z)
moveToPoint(nextPoint)
rotateHandle(rot)
rot = Vector3.new(0, (rot.Y - 90), 0)
end
end
end