Hi, I’m working on making some tanks for a game of mine, and I’m using SetPrimaryPartCFrame() to move the turret, however it will not work.
The error:
Model:GetPrimaryPartCFrame() failed because no PrimaryPart has been set, or the PrimaryPart no longer exists. Please set Model.PrimaryPart before using this. - Server - Script:4
The thing is I do have a PrimaryPart in my model.
My current code:
local Model = script.Parent
for i = 0, 1, 0.01 do
Model:SetPrimaryPartCFrame(Model:GetPrimaryPartCFrame() * CFrame.new(1, 5, i))
wait(1)
end
Please help!