Why won't my cooldowns work?

I’m really confused as there are debounces for diving but they don’t want to work?

Footage:

CODE:

function moveSet:isDiveCooldownDone(player)
	if not self._lastDiveTime then return true end
	return secondsSince(self._lastDiveTime) >= 1.25
end

function moveSet:dive(player)
	if not (self.isDiveActive and self._canDive and not self._isDiving and self._diveCount < self.maxDives and self:isAlive() and self:inAir() and not NO_STANCE_CHANGE[self.humanoid:GetState()]) and self:isDiveCooldownDone(player) then return false end

	self._isDiving = true
	self._canDive = false
	self._diveCount = self._diveCount + 1

	self.physBall:setActive(true, Enum.PhysBallType.Dive)
	self.physBall.chasis.Velocity = self.hrp.CFrame:vectorToWorldSpace(Vector3.new(0, self.diveJumpPower, -100))

	self.currentAnim:Stop()
	self.currentAnim = self.diveAnim
	self.currentAnim:Play(0.4, nil, 3)

	self.particles:airPuff()
	script.Dive:Play()

	self._lastDiveTime = tick()

	return true
end

figured out the issue, it was the brackets.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.