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

Why does my primary part no longer exist?

Asked by 4 years ago

I'm trying to do a car spawner script and I got so close to finishing but I get this error message

 21:59:59.967 -
Model:SetPrimaryCFrame() failed because no PrimaryPart has been set, or the PrimaryPart no longer exists. Please set Model.PrimaryPart before using this.

Here is my script

    game.ReplicatedStorage:WaitForChild("SpawnCar").OnServerEvent:Connect(function(player, NameOfCar)
        local car = game.ServerStorage.Cars:FindFirstChild(NameOfCar):Clone()
        car:SetPrimaryPartCFrame(player.Character.HumanoidRootPart.CFrame + Vector3.new(0,1,0))
        car.Parent = workspace
        car:MakeJoints()


    end)

It says to use Model.PrimaryPart and isn't that what i'm setting?

1
There is a Primary Part property in the model, make sure you set it Nguyenlegiahung 1091 — 4y
0
Thanks Darksniper600 104 — 4y

Answer this question