Hello people who are competent! My issue today is that no matter what part I try to get the CFrame of, the cloned model won’t rotate to it.
Here’s the script:
wait(3)
local Model = game.ReplicatedStorage:WaitForChild("WeaponModels"):WaitForChild("TommyGun"):Clone()
Model.Parent = game.Workspace.StarterCharacter
AttatchmentCFrame = game.Workspace.StarterCharacter["Right Arm"].WeaponAttatchment.CFrame
ModelCFrame = Model:GetPivot()
Model:PivotTo(ModelCFrame * AttatchmentCFrame)
local Motor6D = Instance.new("Motor6D", game.Workspace.StarterCharacter["Right Arm"])
Motor6D.Part0 = game.Workspace.StarterCharacter["Right Arm"]
Motor6D.Part1 = Model.Gun
game.Workspace.StarterCharacter.Humanoid:MoveTo(game.Workspace.Test.Position)
Here is what is happening when I run the script:
And here is an image of what I want to happen:
As you can see, the rotation of the model won’t match the rotation of the attachment, no matter what rotation either are set to. I have also tried other parts, but it would not work with those either.
I have tried Pivoting, changing the PrimaryPart CFrame, and changing the WorldPosition, but nothing has worked.
I know I have like -83 IQ so what I am doing is most likely very obviously wrong, but I can’t find a solution anywhere when I search for it. Help would be appreciated.