Shield is not working

After you check the equip flag, you dynamically build the shield’s welds (all welded to the handle). In my opinion, I would have this done already with the model, since you also introduced a few bugs.

  • Unequipping and re-equiping would generate the welds again.
  • The welds aren’t even generated correctly, both part0 and part1 are the handle

Next, you parent the shield to workspace, my assumption is it should be the character; would you want a shield instance “floating” in the workspace?

Then you call MakeJoints on the shield’s parent (workspace as of now). Here’s the definition of :MakeJoints() from the wiki.

Description: Goes through all parts contained in the Model. If any part’s side has a SurfaceType that can make a joint it will create a joint.

So I assume that’s not at all what you want, you can remove that line.

Finally, you create a weld for the hand. As far as I can tell, that’s correct. Though, using instance.new(name, parent) and supplying the parent is bad practice; you should initalize all the properties before setting the parent. Also you set the C1 to the default value.

You can read about the instance.new problem here

1 Like