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

where would i put setprimarypartcframe in this script?

Asked by 4 years ago

where would i put

dark:SetPrimaryPartCFrame(CFrame.new(x,y,z) * CFrame.Angles(x,y,z))

in this script

local rp = game.ReplicatedStorage
local dark = rp:WaitForChild("Right Hand")


game.Players.PlayerAdded:Connect(function(player)
    player.CharacterAdded:connect(function(character)
        character:WaitForChild("RightHand").Transparency = 0

        local ClonedRH = dark:Clone()
        ClonedRH.Parent = character

        ClonedRH:SetPrimaryPartCFrame(character:WaitForChild("RightHand").CFrame)
        local Weld = Instance.new("Weld")
        Weld.Part0 = ClonedRH.Main
        Weld.Part1 = character:WaitForChild("RightHand")
        Weld.C1 = -- do i put it in here
        Weld.Parent = character:WaitForChild("RightHand")
    end)
end)    

if you have the answer can you modify this script and explain it please thank you.

1 answer

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

One thing I see that is your trying to get the PrimaryPartCFrame of the cloned hand, but the cloned hand doesn't have a primarypartcframe to use, it already has its own.

local rp = game.ReplicatedStorage
local dark = rp:WaitForChild("Right Hand")


game.Players.PlayerAdded:Connect(function(player)
    player.CharacterAdded:connect(function(character)
        local right = character:WaitForChild("RightHand")
        right.Transparency = 0

        local ClonedRH = dark:Clone()
        ClonedRH.Parent = character

        ClonedRH.CFrame = right.CFrame * CFrame.Angles(0, 0, 0)
        local Weld = Instance.new("Weld")
        Weld.Part0 = ClonedRH.Main
        Weld.Part1 = right
        Weld.C1 = -- do i put it in here
        Weld.Parent = right
    end)
end)

I hope this helped.

0
although you tried to help the model doesnt even get on the hand. when i spawn it just falls Fxding_cam 60 — 4y
Ad

Answer this question