Hello, I am trying to rotate a model, but I get this error
Model:GetPrimaryPartCFrame() failed because no PrimaryPart has been set, or the PrimaryPart no longer exists. Please set Model.PrimaryPart before using this.
The thing is, I have set the primary part
-- this is a localscript inside StarterPlayerScripts
local RunService = game:GetService("RunService")
local model = workspace:WaitForChild("BrownShrooms1")
while true do
model:SetPrimaryPartCFrame(model:GetPrimaryPartCFrame()*CFrame.fromEulerAnglesXYZ(math.rad(1),0,0))
RunService.Stepped:Wait()
end
What could be the problem?
Thanks