i making a jojo game and when player timestop and damage player i want to make the damage delay how to do that?
Add a value somewhere on the player called “DelayedDamage”, and then once the said event ends, make the player take that damage one by one and delete each of the values.
Or instead of making a value, you can make it a variable
local damageAccumulated = 0
humanoid:TakeDamage(damageAccumulated)
how to add when event is end ?
Ohh, can you show us the script u doing?
this is my function barrrage and damage player
local function Detect(Character)
local Hitbox = script.Hitbox:Clone()
Hitbox.Parent = game.Workspace
Hitbox.CFrame = Character.PrimaryPart.CFrame * CFrame.new(0,0,Hitbox.Size.Z/2 * -1)
Debris:AddItem(Hitbox,.3)
local Connection
Connection = Hitbox.Touched:Connect(function(hitted)
if hitted.Parent:FindFirstChild(“Humanoid”) and not hitted:IsDescendantOf(Character) then
local Enemy = hitted.Parent
Enemy.Humanoid:TakeDamage(Damage)
Connection:Disconnect()
Hitbox:Destroy()
local bv = Instance.new(“BodyVelocity”)
bv.MaxForce = Vector3.new(1e6,1e6,1e6)
bv.Velocity = Character.PrimaryPart.CFrame.LookVector * 2
Debris:AddItem(bv,.2)
bv.Parent = Enemy.PrimaryPart
Enemy.Humanoid:LoadAnimation(script.HitAnim):Play()
Enemy.Humanoid.WalkSpeed = 4
Enemy.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, false)
Enemy.Backpack.UsingMove.Value = true
wait(1)
Enemy.Humanoid.WalkSpeed = 16
Enemy.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, true)
Enemy.Backpack.UsingMove.Value = false
end
end)
end
where should i add if Timestop == true then
delay damage