Okay so I managed to get PrimaryPart into my Model using
local ZAP = game.ServerStorage.KEffects.ZAP local PrimePart = game.ServerStorage.KEffects.PrimaryPart local ClonePrimePart = PrimePart:Clone() cloneZAP = ZAP:Clone() cloneZAP.Parent = game.Workspace.kEffect ClonePrimePart.Parent = game.Workspace.kEffect:WaitForChild("ZAP") --waiting for model cloneZAP.PrimaryPart = ZAP.PrimaryPart cloneZAP:SetPrimaryPartCFrame(CFrame.new(10,10,10))
But im still getting this error
Model:SetPrimaryCFrame() failed because no PrimaryPart has been set, or the PrimaryPart no longer exists. Please set Model.PrimaryPart before using this.
what am I missing?
Fixed it, I set the primary part in before spawning the part
and named the part PP since I was still getting an error when part was named PrimaryPart
local ZAP = game.ServerStorage.KEffects.ZAP cloneZAP = ZAP:Clone() cloneZAP.PrimaryPart = cloneZAP.PP cloneZAP.Parent = game.Workspace.kEffect cloneZAP:SetPrimaryPartCFrame(CFrame.new(10,10,10))