Hello everyone I was hoping someone can show me a way to do this
How could I make it possible for a Frame to pop up based off the players “Currency” for example once a player hits the required amount a frame in the UI will unlock
I’m clueless on how to create this help will be gladly appreciated
You can insert a LocalScript in the Frame and set a variable for the LocalPlayer. Example: local player = game.Players.LocalPlayer, and then set an if statement, which will be like:
if player:WaitForChild("leaderstats").CurrencyName.Value >= requiredAmount then
-- Remember: WaitForChild is extremely important when using LocalScripts
-- Do stuff
end
So, @FeaturedLua did show you a good way to do this although here is a way I would go about doing this.
player:WaitForChild("leaderstats").CurrencyName.Changed:Connect(function()
if player.leaderstats.Currencyname.Value >= amount then
-- whatever happens here
-- still featuredlua has a good method although this one might work better...I don't exactly know
end
end)