#how to make a frame visible if a value is higher than default
6 messages · Page 1 of 1 (latest)
Make your leaderstat, if you have already done that, then u can move on to the next step. If u need one, then just tell me and I will script one for u fast.
- Now that u have your leaderstats, it should be in the player.leaderstats folder, so in your UI frame, you type this script.
game.Players.PlayerAdded:Connect(function()
local player = game.Players.LocalPlayer
local leaderstats = player:WaitForChild("leaderstats")
local currency = leaderstats.Currency
--This is the name of your value
if currency.Value >= 10 then
local frame = script.Parent
--this script should be inside of the frame
frame.Visible = true
end
end
the script should be a LocalScript inside of the frame