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

Error code. Can not understand. ???lllllllllllllllllllllllllllllllll

Asked by 6 years ago

I have an error, I do not know how to solve it. Help me please.

The error itself:

Model:GetPrimaryCFrame() failed because no PrimaryPart has been set, or the PrimaryPart no longer exists. Please set Model.PrimaryPart before using this.

01local Parent = script.Parent
02local Config = Parent.Config
03local Enabled = Config.Enabled
04local model = Parent
05 
06 
07 
08local function DoorAnimation()
09    if not Enabled.Value then
10        Enabled.Value = true
11        for i = 0, 17 do
12            model:SetPrimaryPartCFrame(model:GetPrimaryPartCFrame() * CFrame.Angles(0, 0.1, 0))
13            wait()
14        end
15        wait(2)
View all 23 lines...
0
is this on roblox studio? mewant_taco 17 — 6y

1 answer

Log in to vote
1
Answered by 6 years ago

As far as I can tell, your code is fine but you haven't set the PrimaryPart in your model, you can either do this in your code:

1model.PrimaryPart = model.A_Part

or, you can set it manually in the workspace by clicking on your model, and where it says Primary Part in properties, click that and then a Part in your model.

Ad

Answer this question