I am trying to make it so that when the boolean value is false the script's parent (the GUI) will change to a bright red colour but it does not work and i don't see anything wrong with it (i am new to LUA)
https://pastebin.com/DzSksHg4 < script
I am trying to make it so that when the boolean value is false the script's parent (the GUI) will change to a bright red colour but it does not work and i don't see anything wrong with it (i am new to LUA)
https://pastebin.com/DzSksHg4 < script
simple fix for yours your testing for a "string" you need to test for Boolean YOUR CODE:
local Hamon = game.Players.LocalPlayer.Leaderstats.IsHamon
if Hamon.Value == "false" then -- this is testing a string not a Boolean
script.Parent.BackgroundColor3 = "Bright Red"
end
to fix it all you need to do is remove the "quotation marks" like:
local Hamon = game.Players.LocalPlayer.Leaderstats.IsHamon
if Hamon.Value == false then -- this is now testing a Boolean
script.Parent.BackgroundColor3 = "Bright Red"
end
NOTE: please use the code block (at the top with the Lua Logo)
NOTE2: i dont know if this works: script.Parent.BackgroundColor3 = "Bright Red"
This discussion is preserved as it was. New answers, comments, and votes are closed.