I did a gun with a shield,but the shield doesn't stop the bullets,and my solution was welding a invisible part of workspace
to the riot tool,i did that script,but it's not working!:<
It's a normal script inside the tool
local prev local parts = workspace.Part for i = 1,#parts do if (parts[i].className == "Part") then if (prev ~= nil)then local weld = Instance.new("Weld") weld.Part0 = prev weld.Part1 = parts[i] weld.C0 = prev.CFrame:inverse() weld.C1 = parts[i].CFrame:inverse() weld.Parent = prev end prev = parts[i] end end wait(3) script:remove()
What you did wrong is that you INVERSE Nothing so they doesnt get stuck to each other to fix this you need to Inverse them
local prev local parts = workspace.Part for i = 1,#parts do if (parts[i].className == "Part") then if (prev ~= nil)then local weld = Instance.new("Weld") weld.Part0 = prev weld.Part1 = parts[i] weld.C0 = prev.CFrame:inverse() *parts[i] weld.Parent = prev end prev = parts[i] end end wait(3) script:remove()
I hope I helped you :D