This is my script but it isn't working and I don't know why
local required_points = 5
local db = true
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid")then
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player.leaderstats.Points.Value >= required_points then
if db then
db = false
script.Parent.Transparency = 0.5
script.Parent.CanCollide = false
wait(3)
script.Parent.CanCollide = true
script.Parent.Transparency = 0
db = true
end
player.Character.Humanoid.Health = 0
end
end
end)

2 comments
if db == true then
the
player.Character.Humanoi.Health = 0command should go in an else block withif db