Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Im trying to make a textbutton that kills you with a cool down. What is wrong?

Asked by 6 years ago

I only made a button to kill so you get points. but I dont want people to get to get points while being dead. What is wrong?

local debounce = false

if debounce == false then
    debounce = true
    script.Parent.MouseButton1Click:Connect(function()
        wait(5)
        debounce = false
    end)
end
0
I am in fact a beginner. Kul3dud3123 -5 — 6y
0
Well, all you need is a script signal to fire a cooldown system. Also of course the death. StateSector 8 — 6y
0
nevermind, I found out what it was Kul3dud3123 -5 — 6y
0
put solved in the title Paintertable 171 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago
local debounce = false

if debounce == false then
    debounce = true
    script.Parent.MouseButton1Click:Connect(function()
        if game.Players.LocalPlayer.Character.Health <= 0 then
        return end
        else 
        wait(5)
        debounce = false
    end)
end
Ad

Answer this question