Arm Glitches On Equip

Hello Developers, I am making a catch system for football but theirs a problem. When I pickup the football/catch it and the weld has been activated the weld don’t destroy and I don’t understand why. Please help.

Code:

local Player = game:GetService( 'Players' ).LocalPlayer

local Character = Player.Character or Player.CharacterAdded:Wait()

local Mouse = Player:GetMouse()

local CDebounce = false

local Football = nil

local function Catch()

-- Instances --

local RAWeld = Instance.new( 'Weld' )

local LAWeld = Instance.new( 'Weld' )

-- Data --

RAWeld.Name = 'RAW'

RAWeld.Part0 = Character.Torso

RAWeld.Part1 = Character[ 'Right Arm' ]

RAWeld.Parent = Character:WaitForChild( 'Instances' )

LAWeld.Name = 'LAW'

LAWeld.Part0 = Character.Torso

LAWeld.Part1 = Character[ 'Left Arm' ]

LAWeld.Parent = Character:WaitForChild( 'Instances' )

-- Move Arms --

for I = 1,45 do

local RCFrame = CFrame.new(Character.Torso.CFrame * Vector3.new(1,1.,0), workspace:FindFirstChild('Football').Position) * CFrame.Angles(math.pi / 2, 0, 0)

local LCFrame = CFrame.new(Character.Torso.CFrame * Vector3.new(-1,1.,0), workspace:FindFirstChild('Football').Position) * CFrame.Angles(math.pi / 2, 0, 0)

RAWeld.C0 = Character.Torso.CFrame:toObjectSpace(RCFrame) * CFrame.new(0, -.7, .6)

LAWeld.C0 = Character.Torso.CFrame:toObjectSpace(LCFrame) * CFrame.new(0, -.7, .6)

wait(1 / 45)

end

if Character:FindFirstChild('Football') then

RAWeld:Destroy() LAWeld:Destroy()

end

wait(1.75) RAWeld:Destroy() LAWeld:Destroy()

end

Mouse.Button1Down:Connect(function()

Catch()

end)
1 Like
local Player = game:GetService( 'Players' ).LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Torso = Character:WaitForChild("Torso")
local RightArm = Character:WaitForChild("RightArm")
local LeftArm = Character:WaitForChild("LeftArm")
local Instances = Character:WaitForChild("Instances")
local Mouse = Player:GetMouse()
local CDebounce = false
local Football = nil

local function DestroyWelds(Child)
	if Child.Name == "Football" then
		-- Delay --
		task.wait(1)
		local RAWeld = RightArm:FindFirstChild("RAW")
		local LAWeld = LeftArm:FindFirstChild("LAW")
		if RAWeld and LAWeld then
			RAWeld:Destroy()
			LAWeld:Destroy()
		end
	end
end

local function Catch()
	-- Instances --
	local RAWeld = Instance.new("Weld")
	local LAWeld = Instance.new("Weld")

	-- Data --
	RAWeld.Name = "RAW"
	RAWeld.Part0 = Torso
	RAWeld.Part1 = LeftArm
	RAWeld.Parent = Instances
	LAWeld.Name = "LAW"
	LAWeld.Part0 = Torso
	LAWeld.Part1 = LeftArm
	LAWeld.Parent = Instances

	-- Move Arms --
	for i = 1, 45 do
		local RCFrame = CFrame.new(Torso.CFrame * Vector3.new(1, 1, 0), workspace.Football.Position) * CFrame.Angles(math.pi / 2, 0, 0)
		local LCFrame = CFrame.new(Torso.CFrame * Vector3.new(-1, 1, 0), workspace.Football.Position) * CFrame.Angles(math.pi / 2, 0, 0)
		RAWeld.C0 = Torso.CFrame:toObjectSpace(RCFrame) * CFrame.new(0, -.7, .6)
		LAWeld.C0 = Torso.CFrame:toObjectSpace(LCFrame) * CFrame.new(0, -.7, .6)
		task.wait(1 / 45)
	end
end

Mouse.Button1Down:Connect(Catch)
Character.ChildAdded:Connect(DestroyWelds)

If the delay isn’t needed feel free to remove it.

1 Like