Help with making a shield compatible with R15

Hello fellow developers ! I found this shield model from the toolbox of Roblox studio and it works really nice but the problem is that the script for it breaks for R15 avatar as it is I think designed only for R6 avatar type. I have fixed it to the extent that it properly works like a shield but the problem is that whenever a R6 avatar equips it , this is what happens -


and whenever a R15 avatar equips it , this happens -

I understood the problem was due to the welding done and here is the code of welding

local rightgrip = character["Right Arm"]:WaitForChild("RightGrip")
	rightgrip.C0 = CFrame.new(0.409522653, -0.000911712646, 0.516324997, -0.0116359973, -0.0435790196, -0.998981893, 0.999929667, 0.00166221452, -0.0117195444, 0.0021712482, -0.999047935, 0.0435565971)
	local rightarm = Instance.new("Weld", owner.Character.Torso)
	rightarm.Part0 = owner.Character.Torso
	rightarm.Part1 = owner.Character["Right Arm"]
	rightarm.C0 = CFrame.new(1.5,0,0)
	rightarm.Name = "RightArmWeldshield"
	local head = Instance.new("Weld", owner.Character.Torso)
	head.Part0 = owner.Character.Torso
	head.Part1 = owner.Character.Head
	head.C0 = CFrame.new(0,1.5,0)
	head.Name = "HeadWeldshield"

There is this code as well

coroutine.wrap(function()
		while runservice.Stepped:wait() and equipped do
			rightarm.C0 = rightarm.C0:lerp(CFrame.new(1.40557981, 0.499999762, -0.579227924, 0.98480767, 0.173648134, 3.55271368e-15, -4.39884928e-08, 2.49471157e-07, -0.999999821, -0.173648134, 0.98480767, 2.5331974e-07),0.2)
			head.C0 = head.C0:lerp(CFrame.new(0, 1.49999976, 0, 0.173648208, 0, -0.98480767, 0, 0.999999881, 0, 0.98480767, 0, 0.173648208),0.2)
			humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0, 0, 0, 0.173648134, 0, 0.98480773, 0, 0.99999994, 0, -0.98480773, 0, 0.173648134),0.2)
		end

I don’t know anything about welding and would really appreciate any help I receive by which I can play this animation in R15 avatar type and if you think that there is something in the code that I haven’t mentioned then here is the model link -https://www.roblox.com/library/7089110977/shield-model
You can download and test it.

You are using R6 parts to weld things to an R15 rig.

Below you can find the names to all of the parts in an R15 rig:

1 Like

I recommend learning how to make rigs just for adding the weapons/Items onto the character.

I would have attached the shield to a rig with Motor6ds (So it could appear in the animation editor)
then when the shield is equipped you can position it how along the arm however you like and just run a looped animation.

But to do this.

  • first you need to create the test rig (Connecting Shield to rig with motor6d)

  • Once you have the rig create loop’d shield animation

  • create remote for attaching the shield to the player on equip/ unattaching for unequip

This can be a bit complicated hard to get a hang of if its too complicated for you I don’t recommend going out of your comfort zone unless your up for it But I believe its a good thing to know for long term development (I use this method quite a lot)

1 Like

so you are saying that I make new animations. I think I will keep this as my last resort. Thank you very much btw.

Sorta like new animations but…

These animations would handle positioning the shield for you effortlessly. And if you plan to do anything involving moving the shield could be done via an animation. Throwing, Twirling anything you can imagine :grin: or to be specific anything you can animate :face_with_monocle:

1 Like

I renamed all the R6 parts with their changed R15 alternatives but still nothing happened. I think I made mistakes in their renaming.
Here are the changes I made -

local RightHand = character[“RightHand”]:WaitForChild(“RightHand”)
RightHand.C0 = CFrame.new(0.409522653, -0.000911712646, 0.516324997, -0.0116359973, -0.0435790196, -0.998981893, 0.999929667, 0.00166221452, -0.0117195444, 0.0021712482, -0.999047935, 0.0435565971)
local RightLowerArm = Instance.new(“Weld”, owner.Character.UpperTorso)
RightLowerArm.Part0 = owner.Character.UpperTorso
RightLowerArm.Part1 = owner.Character[“Right Arm”]
RightLowerArm.C0 = CFrame.new(1.5,0,0)
RightLowerArm.Name = “RightArmWeldshield”
local head = Instance.new(“Weld”, owner.Character.UpperTorso)
head.Part0 = owner.Character.UpperTorso
head.Part1 = owner.Character.Head
head.C0 = CFrame.new(0,1.5,0)
head.Name = “HeadWeldshield”

I think that this can be a solution this problem. I think that as soon as the player equips the shield , the avatar type of the player will be changed to R6 and as soon as the shield is unequipped , the avatar will change back to R15 but I have no idea how to do that.

Change
local RightHand = character[“RightHand”]:WaitForChild(“RightHand”)
to
local RightHand = character[“RightHand”]
and
RightLowerArm.Part1 = owner.Character[“Right Arm”]
to
RightLowerArm.Part1 = owner.Character[“RightHand”]

1 Like

Still not working but I have now decided to make new animations and play them only. Thanks for all the help you gave me