I had to reupload this post because I wasn't getting any answers that worked. So, I want to make a collecting game and the catalog shows the collectibles you have. I made all of the collectibles leaderstats so you can save it. So, I made the image in the gui have a value and a script. Here it is:
local ting = 0
mlvl = script.Parent.Lvl.Value
if ting == 0 then
ting = 1
if check ~= nil then
local user = game.Players.LocalPlayer
local stats = user:findFirstChild("leaderstats")
local Lvl = stats.Molly
if stats ~= nil and Lvl.Value >= mlvl then
script.Parent.Parent.Molly.ImageTransparency = 1
end
if Lvl.Value < mlvl then
script.Parent.Parent.Molly.ImageTransparency = 0
end
end
ting = 0
end
So if you have this much leaderstat, the image will show up, basically. So, the problem is, the image doesn't show up. Thank you!

8 comments
is this the full script? and is it a local script
@kingdom5, Yes, this is the full script and it's a server script. I have tried local and server script.
Then where do I see you defining 'check'?
@Feahren, What do you mean? And I didn't made this script exactly. I did do the stuff after "if check" though.
The first issue is that this is not inside an changed event so when Lvl changes the code runs the checks again
@Kindom5 How do I do that?
you haven't defined what "check" is. What do you mean by "check"?
@kingblaze, I’m not sure, like I said, I didn’t code that part...