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

how do i change a boolean value as a property?

Asked by 2 years ago

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 ¯_(?)_/¯

0
Try changing the playerGUI instead of the startergui JesseSong 3916 — 2y
0
and make sure it JesseSong 3916 — 2y
0
and make sure its in a localscript JesseSong 3916 — 2y

1 answer

Log in to vote
0
Answered by 2 years ago
Edited 2 years ago

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
0
Sorry, but that won't work. You need two equals JesseSong 3916 — 2y
0
why you need two equals when u setting a value? Nguyenlegiahung 1091 — 2y
Ad

Answer this question