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

Why Doesn't This Custom Character Right Hand Weld Script Work?

Asked by 4 years ago
Edited 4 years ago

I have this script right, I understand what is going on in the script but it doesn't seem to work, it's not creating the new weld when you equip the tool like it should.

--Here is the code

script.Parent.Parent.Equipped:Connect(function()

local part = script.Parent
local character = script.Parent.Parent.Parent
local weld = Instance.new("Weld", part)
weld.Part0 = part
weld.Part1 = character["RightHand"]
weld.C0 = CFrame.new(0, 0, 0) + Vector3.new(0,character["RightHand"].Size.Y/2,0)

end)

--And here is the order things are set in

V StarterPack V Tool V Handle WeldToHand(Script)

The script is not a local script Please help, thank you.

EDIT

This was solved by some trial and error

My script was correct but I just had to change my RigType from R6 to R15

1 answer

Log in to vote
0
Answered by
Kurcha 33
4 years ago

Does the weld have a parent? Try making the weld own a parent.

0
That doesn't seem to work if you mean (weld.Parent = script.Parent.Parent) or just one parent MasterMan917 10 — 4y
Ad

Answer this question