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

Strange GUI transparency issue?

Asked by
RoboFrog 400 Moderation Voter
9 years ago

I've been working on a game for a while now and am finally at the ending -- the finishing animation. Most of this is run through a GUI, but I'm having trouble with getting it all to display. The entire script is run through, but two ImageLabels will not ever display, however a TextLabel (used as a background) will. Here's the script so far --

local black = script.Parent.BackgroundTransparency
local hant1 = script.Parent.haunt1.ImageTransparency
local hant2 = script.Parent.haunt2.ImageTransparency
local camfoc = game.Workspace.GhostEnd.Head.Position
local camera = workspace.CurrentCamera
local targetst = game.Workspace.subend.Position

camera.CameraType = Enum.CameraType.Scriptable

print("End running")

for i = 1,10 do -- This one displays
    black = black - .1
    wait(.1)
end

wait(3)

for i = 1,10 do -- Does not
    hant1  = hant1 - .1
    wait(.1)
end

wait(2)

for i = 1,10 do 
    hant1  = hant1 + .1
    wait(.1)
end

wait(1)

for i = 1,10 do -- Does not
    hant2  = hant2 - .1
    wait(.1)
end

wait(2.5)

for i = 1,10 do
    hant2  = hant2 + .1
    wait(.1)
end

-- Below not really important, I don't think so, at least.

print ("camrah yoh")

game.Workspace.CurrentCamera.Focus=CFrame.new(camfoc)
camera.CoordinateFrame = CFrame.new(targetst)

for i = 1,10 do
        local targetsx = -263
        local targetsy = 689.591
        local targetsz = -6.201
        targetsx = targetsx - 5.5
        targetsy = targetsy + .02
        targetsz = targetsz + .01
        camera.CoordinateFrame = CFrame.new(targetsx, targetsy, targetsz)
        wait()
end

for i = 1,4 do
    black = black + .25
    wait(.07)
end

As you can see, "hant" 1 and 2 will not display for me. This is in a local script inside a GUI in lighting. The GUI is copied into the player's GUI when they touch a block (I get prints, so it has to be reading correctly). I can manually change the transparency of the ImageLabels and see it, but not through this script. The ZIndexes are all correct.

Thank you for reading, and I hope to find a solution to this strange issue.

Answer this question