hello again scripting helpers, i have no clue how to make add a multiplier to humanoid:takedamage.
btw the multiplier is a NumberValue thats in the player model
the line i wanna add the multiplier to
humanoid:TakeDamage(46)
hole script
local tool = script.Parent
local canDamage = false
local Cooldown = false
stronkness = script.Parent.Parent.Strength.Value
local WaitTime: number = .5 --cool down
local function onTouch(otherPart)
local humanoid = otherPart.Parent:FindFirstChild("Humanoid")
if not humanoid then return end
if humanoid.Parent ~= tool.Parent and canDamage then
humanoid:TakeDamage(46)
tool.Handle.HitSound.TimePosition = 0
tool.Handle.HitSound.Playing = true
else
return
end
canDamage = false
end
local function slash()
if Cooldown then return end
Cooldown = true
local str = Instance.new("StringValue")
str.Name = "e" --idk why i made it e, i just edited the script that i used for an old game
str.Value = "Slash"
str.Parent = tool
canDamage = true
wait(WaitTime)
Cooldown = false
end
local function swingsound()
wait(.3) -- time untill swing sound plays
tool.Handle.SwingSound.TimePosition = 0
tool.Handle.SwingSound.Playing = true
end
tool.Activated:Connect(swingsound)
tool.Activated:Connect(slash)
tool.Handle.Touched:Connect(onTouch)
thanks in advence

1 comment
for clarification: i just need a way to make the multiplier work, i dont need help making the multiplier. also i want the multiplier to be the value of a NumberValue thats located in the model of the player. i just need the add the multiplier to the humanoid:TakeDamage(46) line