Attempt to call a number value

I geniuenly have no idea why it doesn’t work

function Damage(Victim, Damage)
    Victim.Humanoid:TakeDamage(Damage)
end

game:GetService("ReplicatedStorage"):WaitForChild("DamageEvent").OnServerEvent:Connect(function(Player, Victim, Damage)
    Damage(Victim, Damage)
end)

It is longer than this, i just shortened it so it doesn’t hurt anyone who can script better than I.

1 Like

The incorrect line is

Damage(Victim,Damage)

The damage argument renders the damage function unreachable. Rename one of them and it will work.

2 Likes

Okay so that was disappointingly easy to fix, thanks anyway

1 Like