Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

where would i put setprimarypartcframe in this script?

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

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.

1 comment

0

although you tried to help the model doesnt even get on the hand. when i spawn it just falls

This discussion is preserved as it was. New answers, comments, and votes are closed.