Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

4 comments

0

I am in fact a beginner.

0

Well, all you need is a script signal to fire a cooldown system. Also of course the death.

0

nevermind, I found out what it was

0

put solved in the title

1 answer

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

This discussion is preserved as it was. New answers, comments, and votes are closed.