local player = game.Players.LocalPlayer local level = player.leaderstats.Level if level.Value >= 1 then player.PlayerGui.ScreenGui.TextButton.Visible = true else player.PlayerGui.ScreenGui.TextButton.Visible = false end
this code is supposed to let the player see the button only after he reaches LVL.1 but it doesn't show it even after he reaches LVL.1
Try this:
local player = game.Players.LocalPlayer local level = player:WaitForChild("leaderstats"):WaitForChild("Level") while true do wait() if level.Value >= 1 then player.PlayerGui.ScreenGui.TextButton.Visible = true else player.PlayerGui.ScreenGui.TextButton.Visible = false end end
--// I believe it would look more along the lines of this local player = game.Players.LocalPlayer local level = player.leaderstats.level level.Changed:connect(function() if level.Value >= 1 then player.PlayerGui.ScreenGui.TextButton.Visible = true elseif level.Value < 1 then player.PlayerGui.ScreenGui.Textbutton.Visible = false end end