Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Image won't show if leaderstats is this high?

Asked by 5 years ago
Edited 5 years ago

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:

01local ting = 0
02mlvl = script.Parent.Lvl.Value
03 
04 
05 
06    if ting == 0 then
07    ting = 1
08 
09    if check ~= nil then
10 
11        local user = game.Players.LocalPlayer
12        local stats = user:findFirstChild("leaderstats")
13        local Lvl = stats.Molly
14 
15        if stats ~= nil and Lvl.Value >= mlvl then
View all 35 lines...

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!

0
Is mlvl the player's level? Or is it player.leaderstats.Molly? compUcomp 417 — 5y
0
Hi, thanks for responding! The mlvl is the value. I have a value in the imagelabel and it tells how much value of the leaderstats you require. PadmeOragana 78 — 5y
0
You have to use a while loop to check the conditional if it's true or not. killerbrenden 1537 — 5y
0
Can somebody please help me? None of these answers are working... PadmeOragana 78 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
01local ting = 0
02mlvl = script.Parent.Lvl.Value
03 
04 
05 
06    if ting == 0 then
07    ting = 1
08 
09    if check ~= nil then
10 
11        local user = game.Players.LocalPlayer
12        local stats = user:findFirstChild("leaderstats")
13        local Lvl = stats.Molly
14 
15        if stats ~= nil and Lvl.Value >= mlvl then
View all 35 lines...

ImageTrasparency just makes the background of your image transparent. If you want to make they car invisible use the Visible property.

If this helped please accept this as your answer.

All the best,

PrismaticFruits - obviously a very talented scripter

0
Hi, thank you for responding! Unfortunately, this didn't work though. The image didn't turn visible... PadmeOragana 78 — 5y
0
You have to use a while loop to check the conditional if it's true or not. killerbrenden 1537 — 5y
0
@KillerBrenden, thanks for responding, but I tried making it a loop, but it didn't work either... PadmeOragana 78 — 5y
0
Hello? The script doesn't work, but thanks for trying... PadmeOragana 78 — 5y
Ad

Answer this question