Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

SetPrimaryPartCFrame() doesn't work when model is unanchored?

Asked by
dionant 23
6 years ago
Edited 6 years ago

Basically as the title says. I've got a HatchMain (PrimaryPart) welded to a HatchPart, which is welded to the vehicle's chassis. The hatch opens and closes if the weld script doesn't run, but it doesn't work at all if the weld script ran. I thought it was a welding-related issue, but I'm guessing it's related to the fact it's unanchored. Anyone?

elseif not Opened.Value then -- Open
                Moving.Value = true
                for i = 1, 44 do
                    Hatch:SetPrimaryPartCFrame(Hatch.PrimaryPart.CFrame*CFrame.Angles(math.rad(CloseNumber),(0),(0)))
                    wait()
                end
0
Line 4 seems to be cut by the border. Proper line is Hatch:SetPrimaryPartCFrame(Hatch.PrimaryPart.CFrame*CFrame.Angles(math.rad(CloseNumber),(0),(0))) dionant 23 — 6y

Answer this question