Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Image won't show if leaderstats is this high?

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!

4 comments

0

Is mlvl the player's level? Or is it player.leaderstats.Molly?

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.

0

You have to use a while loop to check the conditional if it's true or not.

0

Can somebody please help me? None of these answers are working...

1 answer

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.Visible = false





end 

        if Lvl.Value < mlvl then

        script.Parent.Parent.Molly.Visible = true



       end
    end

    ting = 0
    end

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

4 comments

0

Hi, thank you for responding! Unfortunately, this didn't work though. The image didn't turn visible...

0

You have to use a while loop to check the conditional if it's true or not.

0

@KillerBrenden, thanks for responding, but I tried making it a loop, but it didn't work either...

0

Hello? The script doesn't work, but thanks for trying...

This discussion is preserved as it was. New answers, comments, and votes are closed.