I'm making a gui lock script where if you have under a certain amount of cash, an upgrade button would say 'LOCKED' and if it went over, it would say what the upgrade is and stuff..
Part of the script works... only the first part where it says that the upgrade is locked, but the other half won't work and there is NO errors in the output...
anyways, here's the lock script (local script inside screen gui)
local upg5T = script.Parent.upg5
local plr = game.Players.LocalPlayer
if plr.leaderstats.Cash.Value < 150000 then
upg5T.Text = "LOCKED"
elseif
plr.leaderstats.Cash.Value > 150000 then
upg5T.Text = "UNLOCKED"
wait(2)
upg5T.Text = "blabla"
if plr.leaderstats.Cash.Value < 150000 then
upg5T.Text = "blabla"
end
end

1 comment
sorry for the late post, but i was actually heading for when you unlock it it cannot be locked again once it goes under the unlock value.