Okay, im using Model:SetPrimarypartCFrame() to move a Helicopter for a cutscene, however, the look in move() never stops but everything else works fine, please help!
local RunService = game:GetService("RunService")
local part = script.Parent
local partPrimary = part.PrimaryPart
wait(5)
local timesRepeat = 0
function move()
for i = 1, 10 do
part:SetPrimaryPartCFrame(part:GetPrimaryPartCFrame() * CFrame.fromEulerAnglesXYZ()(-0.01,0,0))
wait()
end
end
RunService.Heartbeat:Connect(function()
if partPrimary.Position ~= Vector3.new(189, 94, 425) then
part:SetPrimaryPartCFrame(part:GetPrimaryPartCFrame() * CFrame.new(0,1,0))
else
wait(2)
move()
end
end)
Here is a video demonstrationg what happens:
https://gyazo.com/e7dd60a8ee39217cac988a38838491c2
Yet again, please help me!