I’m trying to index a value in a table called DAMAGE, I am literally printing it every 0.1 seconds to check if its nil, and its not. Yet when I reference it in my OnHit function it says attempt to index nil?
function Gauntlet:OnHit(humanoid)
if self._hitdebounce then return end
self._hitdebounce = true
print("Hit someone")
print(self.config.DAMAGE)
humanoid:TakeDamage(self.config.DAMAGE)
task.wait(2)
self._hitdebounce = false
end
I am checking the value every frame and it prints the damage just fine
task.spawn(function()
while true do
task.wait(0.1)
print(self.config.DAMAGE)
end
end)
What is going on here?