This script is supposed to check your leader stats if you have more then 50 "Jumps" then it will make a button visible on a frame if you don't it want the same thing for 100 "Jumps". It works in studio but not in the game. I hope you can help me fix this :).
local Frame = script.Parent.Parent.Frame
script.Parent.MouseButton1Click:Connect(function()
Frame.Visible = true
if game.Players.LocalPlayer.leaderstats.Jumps.Value >= 50 then
script.Parent.Parent.Frame.Trail1.Visible = true
else
script.Parent.Parent.Frame.Trail1.Visible = false
end
if game.Players.LocalPlayer.leaderstats.Jumps.Value >= 100 then
script.Parent.Parent.Frame.Trail1.Visible = true
script.Parent.Parent.Frame.Trail2.Visible = true
else
script.Parent.Parent.Frame.Trail1.Visible = false
script.Parent.Parent.Frame.Trail2.Visible = false
end
end)

1 comment
Thank you for an example.