This is a snippet of my code:
if c then
gun.gun:SetPrimaryPartCFrame(
CFrame.new(gun.body:GetPrimaryPartCFrame().p,
c)
)
Currently, the model 'gun' is inside another model named 'gun' which has a primary part. I have ungrouped the second 'gun' so now I want to use a replacement method that does not require the function SetPrimaryPartCFrame or GetPrimaryPartCFrame.
Basically, I need an alternative for SetPrimaryPartCFrame and GetPrimaryPartCFrame which does not use a primary part, instead the name of the part: 'rotation'

2 comments
Why not set the primary part to 'rotation'?
@luadotorg the primary part for the model needs to be a separate part.