I managed to fix it. But more errors appear.
enabled = false script.Parent.Equipped:connect(function(m) m.Button1Down:connect(function() local hum = game.Players.LocalPlayer.Character.Humanoid local anim_feet = hum:LoadAnimation(script.Parent.Animation) local current = anim_feet if enabled == false then current:Play() script.Parent.Sound:Play() hum.WalkSpeed = 0 enabled = true else current:Stop() current:Destroy() script.Parent.Sound:Stop() hum.WalkSpeed = 16 end end) script.Parent.Unequipped:connect(function() script.Parent.Sound:Stop() current:Stop() hum.WalkSpeed = (16) end) end) end)
you have a extra end)
enabled = false script.Parent.Equipped:connect(function(m) m.Button1Down:connect(function() local hum = game.Players.LocalPlayer.Character.Humanoid local anim_feet = hum:LoadAnimation(script.Parent.Animation) local current = anim_feet if enabled == false then current:Play() script.Parent.Sound:Play() hum.WalkSpeed = 0 enabled = true else current:Stop() current:Destroy() script.Parent.Sound:Stop() hum.WalkSpeed = 16 end --if end end) -- function mousebutton end end) -- end the eppuiped part script.Parent.Unequipped:connect(function() script.Parent.Sound:Stop() current:Stop() hum.WalkSpeed = (16) end) -- only 1 end for Unequipped. then are no if's or functions to end