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

model:SetPrimaryPartCFrame wont work? (i already set a primary part for the model )

Asked by 1 year ago

Here is the code game.Players.PlayerAdded:Connect(function(Player) Player.CharacterAdded:Connect(function(Character) local ScytheCase = script.ScytheCase:clone() ScytheCase:SetPrimaryPartCFrame(Character.HumanoidRootPart.CFrame) ScytheCase.Parent = Character

    local weld = Instance.new("ManualWeld")
    weld.Part0 = ScytheCase.PrimaryPart
    weld.Part1 = Character.PrimaryPart
    weld.C0 = weld.Part0.CFrame:ToObjectSpace(weld.Part1.CFrame)
    weld.Parent = weld.Part0

    local Scythed = script.Scythe:Clone()
    script.ScytheCase.PrimaryPart = script.ScytheCase.Main
    Scythed:SetPrimaryPartCFrame(ScytheCase.ScytheCase.CFrame)
    Scythed.Parent = Character

    local weld2 = Instance.new("ManualWeld")
    weld2.Part0 = Scythed.PrimaryPart
    weld2.Part1 = ScytheCase.PrimaryPart
    weld2.C0 = weld2.Part0.CFrame:ToObjectSpace(weld2.Part1.CFrame)
    weld2.Parent = weld2.Part0

end)

end)

And yes, ive tried editing the properties of the items primary part.

Answer this question