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

How to edit properties of ImageLabels with a script such as transparency?

I have been working on a GUI for an intro and I was having trouble with making a script I needed to make it so that an image label involved in the intro becomes NOT transparent. When I put the script in and run it it doesn't work. All the positions of objects in the script are right as in all the things I said in order to go into were in correct orders. Here's what I have so far.

function playerEntered(Player)
    local LoadingMenu = script.Parent
    local SlideTime = math.random (2,4)
    local Intro = script.MainIntro
    local SlideOptions = script.Parent.Slides
    wait (math.random (2,3))	
	SlideOptions.Load10.ImageTransparency = 0

	end

game.Players.ChildAdded:connect(playerEntered)

(Thanks for helping if you do!)

1 answer

EDIT: I don't think there is anything wrong with your script. If I were to guess it is with your actual image.

You can try adding these lines to see if it actually fixes anything:

These line sets the transparency to none.

SlideOptions.Load10.Transparency = 0
SlideOptions.Load10.ImageTransparency = 0

This sets the GUI above all else.

SlideOptions.Load10.ZIndex = 10

This makes sure that the GUI is visible.

SlideOptions.Load10.Visible = true

Transparency set at 0 means there is no transparency to it, whether it is a part or a GUI Image. If you want the to be completely transparent you need the transparency to be 1 or you can set the Image's visible bool value to false.

Final Code:

function playerEntered(Player)
    local LoadingMenu = script.Parent
    local SlideTime = math.random (2,4)
    local Intro = script.MainIntro
    local SlideOptions = script.Parent.Slides
    wait (math.random (2,3))    
    SlideOptions.Load10.ImageTransparency = 0
SlideOptions.Load10.Transparency = 0
SlideOptions.Load10.ImageTransparency = 0
SlideOptions.Load10.ZIndex = 10
SlideOptions.Load10.Visible = true
end

game.Players.ChildAdded:connect(playerEntered)

3 comments

0

But I said I am trying to make it so that it ISN'T transparent, the image labels default setting is invisible and that is how I need it so that it appears after those few seconds at the beginning of the script

0

If the image setting is not visible, then why are you using Transparency? it should be '.Visible = true', and not '.Transparency = 0'

0

I understand your problem now and edited my answer

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