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?