im making this move where the player gets “a boost in power” and deals more damage than usual for a few seconds. the move is a melee move and does alot more damage than the usual click combat does.
I tried applying boolvalues to the player that was hit with this attack, and going into the click combat script and detecting the value and dealing more damage, but it doesnt work. Im not sure why even after looking on devforum
Heres the code
Code
hitbox.Touched:Connect(function(per)
if db == false then
db = true
hum:TakeDamage(3)
if hum.Health <= hum.MaxHealth and not hit.Parent:WaitForChild("More Damage") then
db = true
print("gah!")
hum.WalkSpeed = 0
hum.JumpHeight = 0
track:Play()
tween:Play()
--------------
--------------
tween.Completed:Wait()
hum.WalkSpeed = 16
hum.JumpHeight = 7.2
wait(6)
db = false
end
if hit.Parent:WaitForChild("More Damage") then
if debounce == false then
debounce = true
print("More Damage")
hum:TakeDamage(30)
wait(5)
debounce = false
end
end
hitbox:Destroy()
task.wait(1.5)
db = false
end
end)
Help and feedback are appreciated, thank you for your time