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.