Gore System Error

Hello, I was doing a gore system and I thought it was finished, but it had two errors
One serious and one not so serious.

The first problem was in Melee_Client
this is the error
Captura de pantalla 2023-05-26 200146

The other one was in Utilities
This is the error
Captura de pantalla 2023-05-26 193548

Unfortunately I can’t send the scripts because for some reason I can’t close the lua code box, i just can send one per topic i dont really know why

And for that reason I am going to send the most important one, which is the Utilities one, since without the animations the system does not work.

Thank you.

local anims = {}

function module.Weld(Part0, Part1, Parent, Name, Bool)
	local Weld
	if Bool then
		Weld = Instance.new("WeldConstraint")
	else
		Weld = Instance.new("Weld")
	end
	Weld.Part0 = Part0
	Weld.Part1 = Part1
	Weld.Name = Name or Weld.Name
	Weld.Parent = Parent or Part0
end
function module.LoadAnimation(AnimationId: string, Object: Humanoid)
	local AnimationTrack = nil
	local Animation = Instance.new("Animation")
	Animation.AnimationId = AnimationId
	Animation = Object:LoadAnimation(Animation)
	return Animation
end
function module.PlayAnimation(Animation: AnimationTrack, Table: table)
	Animation:Play()
	Animation.Priority = Table.AnimationPriority
	Animation:AdjustSpeed(Table.AnimationSpeed)
	Animation.Looped = Table.Looped
	if not anims[Animation] then
		anims[Animation] = true
		for i,v in pairs(Table.AnimationEvents) do
			Animation:GetPropertyChangedSignal(v.AnimationEventName):Connect(function()
				v.Function()
			end)
		end
	end
end
function module.Random(A, B)
	return Random.new():NextNumber(A, B)
end
function module.ReturnRandom(Value: table)
	return Value[math.random(#Value)]
end
function module.ReturnChildren(Folder)
	return Folder:GetChildren()
end
function module.ReturnFolderChild(Folder)
	return module.ReturnRandom(module.ReturnChildren(Folder))
end
function module.PlaySound(SoundBase: Sound, Parent: BasePart?)
	local Sound = SoundBase:Clone()
	Sound.Parent = Parent
	Sound:Play()
	Sound.Ended:Connect(function()
		Sound:Destroy()
	end)
end

return module```

All of your errors seem very small.

First error is very simple to fix. Blacklist is now deprecated.

Fix 1

Params.FilterType = Enum.RaycastFilterType.Exclude -- this is the same as blacklist.

Second error is also simple.

Fix 2

function module.LoadAnimation(AnimationId: string, Object: Humanoid)
	local AnimationTrack = nil
	local Animation = Instance.new("Animation")
	Animation.AnimationId = AnimationId
	Animation = Object.Animator:LoadAnimation(Animation)
    -- instead of using Object:LoadAnimation (Deprecated), you should use Object.Animator:LoadAnimation()
	return Animation
end

Also, you don’t need to worry much about yellow underlines as they are not as serious as red underlines.

It’s ok but what happens is that now only when you try to hit an object you can only click and the swing doesn’t work again


Heres the output

Does this happen after you change the code or has this been happening?

that happends when i change the code