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

how do i change a boolean value as a property?

i'm just trying to make a text label come up if a button is clicked while debouce is active to notify the player of cooldown

local cooldowngui = game.StarterGui.ScreenGui.cooldown
--referenced the textlabel here

if db then 
	db = false
		--blah blah blah stuff  stuff stuff
    db = true
	else --im not sure what to do here
		cooldowngui = cooldowngui:FindFirstChild("Visible").Value == true
		wait(0.1)
		cooldowngui = cooldowngui:FindFirstChild("Visible").Value == false
	end

i may be stupid ¯_(?)_/¯

3 comments

0

Try changing the playerGUI instead of the startergui

0

and make sure it

0

and make sure its in a localscript

1 answer

✓ Accepted answer

When you are setting value, you will only need 1 = You will use == when you are checking condition

local cooldowngui = game.StarterGui.ScreenGui.cooldown
--referenced the textlabel here

if db then 
    db = false -- Change it like how you change it here
        --blah blah blah stuff  stuff stuff
    db = true
    else --im not sure what to do here
        cooldowngui = cooldowngui:FindFirstChild("Visible").Value = true
        wait(0.1)
        cooldowngui = cooldowngui:FindFirstChild("Visible").Value = false
    end

2 comments

0

Sorry, but that won't work. You need two equals

0

why you need two equals when u setting a value?

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