Background: There are 2 string values inside of this script. one is the regular damage and one is the critical damage value.
This script is supposed to make you deal damage regular damage, or critical but it's not working
script.Parent.Touched:Connect(function(hit)
local DmgValues = script.Dmg.Value and script.DmgCritical.Value
local char = hit.Parent
local hum = char:FindFirstChild("Humanoid")
local criticalpicked = math.random(1, #DmgValues)
if criticalpicked == 1 then
if hum and char.Name ~= script.Parent.Parent.Name then
hum.Health = hum.Health - criticalpicked
script.Disabled = true
wait(0.5)
script.Disabled = false
end
end
end)
