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

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

Asked by 9 years ago

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

Log in to vote
0
Answered by
Im_Kritz 334 Moderation Voter
9 years ago

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)
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 TheSympact 0 — 9y
0
If the image setting is not visible, then why are you using Transparency? it should be '.Visible = true', and not '.Transparency = 0' User#9949 0 — 9y
0
I understand your problem now and edited my answer Im_Kritz 334 — 9y
Ad

Answer this question